|
I can add Blat.exe to my path down in \bin\Debug\ folder and then have the program run in VB2005 IDE and it will work fine using the path in the source code. I can run it with the path of blat pointing to C:\BLAT\Blat.exe and it works fine but I just cannot figure out how to include the blat files in the compiled product. I remember in other programming IDEs where I could include these files in the compilation.
|
|
|
|
|
add a setup project to you're solution
in that project you can add:
-desktop shortcuts
-start menu shortcuts
-files for the application folder. this is the one you want here you can add files to you'r project's exe, make shure you add the output from you're startupproject otherwise it will not run.
These file's whill then be placed to the folder that you'r prog is installed on
also possible:
-setting name that will apeare in software manager
-setting conditions for the setup (.net framework has to be presend is default)
-....
after you are satisfied with the setup of the setup project, build it and you will find a exe and a msi in the debug/release map of this project.
the exe will first check if the .net framework is present and then start the msi wich holds you'r programme and the files you added
look around a bit it has many posability's
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
I am unsure the best way to cancel my background worker (bgw).
My application (form1) has an options screen (form2). On app load, a background worker starts to ping a list of IPs. I would like to go into my options form and tell my app a different list of IPs to ping. Once I make this change, i need to stop the current bgw from pinging, reload the list, and start pinging again.
I know that I first have to set the WorkerSupportsCancelation property to true, which should set CancellationPending to true, then call the CancelAsync method, check the CancellationPending, then cancel it as this article suggests.
My issue is that I am canceling the bgw from the second form and do not currently have a 'DoWorkEventArgs' object to cancel.
What am I missing to get this object and cancel the bgw?
Thanks!
|
|
|
|
|
Once a thread is started and stopped, it cannot be restarted. You're best bet is to cancel the existing operation, and let the thread die. Create a NEW background worker, just the way you already, did and supply it with the new list.
|
|
|
|
|
Hi All
I am trying to connect to my database from the front end in VB.NET 2003, the connection strings that i have tried are not working at present. I have VB.NET 2003 program from last year but that was using access as the back end and VB.NET 2003 as the front end. This year i must use oracle as the back end and Vb.Net 2003 as the front end. The connection strings that i have tried do not seem to be correct but i will keep trying it is probably something simple. Yes the database does connect through odbc and the tns file is correct
|
|
|
|
|
WIthout seeing any code for the connection string, or an error descriptions, about all anyone can do is point you at ConnectionStrings.com[^].
|
|
|
|
|
the code is
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim ctoracleConnection As OleDbConnection<br />
Dim ctoracleCommand As OleDbCommand<br />
Dim dataRow As OleDbDataReader<br />
'MSDORA is the provider when working with Oracle<br />
ctoracleConnection = New OleDbConnection("Provider=MSDAORA.1;User ID=oracle username;password=orac le password; data source=ctoracle")<br />
'opens the connection<br />
ctoracleConnection.Open()<br />
'executes the command and assigns it to the connection<br />
ctoracleCommand = New OleDbCommand("Select EName from emp", ctoracleConnection)<br />
dataRow = ctoracleCommand.ExecuteReader()<br />
While dataRow.Read()<br />
'displays data from the table<br />
MessageBox.Show("Employee Name" & " " & dataRow(0))<br />
End While<br />
dataRow.Close()<br />
ctoracleConnection.Close()<br />
End Sub<br />
End Class<br />
_______________________________________________________________________________________________________________________________
|
|
|
|
|
And the exception message??
|
|
|
|
|
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim derbyConnection As OleDbConnection<br />
Dim derbyCommand As OleDbCommand<br />
Dim dataRow As OleDbDataReader<br />
'MSDORA is the provider when working with Oracle<br />
derbyConnection = New OleDbConnection("Provider=MSDAORA.1;User ID=oracle ken;password=tigger; data source=derby.com")<br />
'opens the connection<br />
derbyConnection.Open() '''''the code falls over here<br />
'executes the command and assigns it to the connection<br />
derbyCommand = New OleDbCommand("Select EName from emp", derbyConnection)<br />
dataRow = derbyCommand.ExecuteReader()<br />
While dataRow.Read()<br />
'displays data from the table<br />
MessageBox.Show("Employee Name" & " " & dataRow(0))<br />
End While<br />
dataRow.Close()<br />
derbyConnection.Close()<br />
End Sub<br />
dave thanks for your help beforehand
|
|
|
|
|
The Provider in the connection string should be just "MSDAORA", drop the ".1" part. I also don't know if putting a period in the database name is legal, nor do I know if putting a space in the User Id, "oracle ken", is legal either.
OleDb is a kind of "generic" database interface. Like the other poster said, you'd get much better performance if you used the OPD.Net provider instead. This will, of course, require a rewrite of your code.
|
|
|
|
|
when opening server explorer should the oracle database not be displayed there for me to point to and then test. As the database is not showing there.
I tried database connection with my access and it connected successfully but will not connect to the oracle database but it is not displayed in the server explorer.
|
|
|
|
|
kendo17 wrote: when opening server explorer should the oracle database not be displayed there for me to point to and then test. As the database is not showing there.
The provider and credentials have to be correct in order for it to connect to the server and get the list of databases. The credentials also have to have permissions in the Oracle server to get that list. I don't know exactly what has to happen on the Oracle server, since I've never used Oracle, nor do I want to.
|
|
|
|
|
Oracle & SQL Server Databases are server-based database. They are not Filedatabase like Microsoft Access. So they cannot be open like you open ur access db file. The Oracle Database like SQL Server has an Enterprise Console where you can manage the database
t.aransiola
|
|
|
|
|
And you're telling me this why??? I know that, and your answer has nothing to do with the problem.
|
|
|
|
|
|
Hi everybody!
I'm developing an application that has to be easy to update, so what I did is a general application that calls diferent dll's. Like this if I change a method that is in A.dll I have only to recomplile this A project and put A.dll in the main application folder.
For now everythink fine, but if I change the version of A.dll (when I change something this would be a new version...) and recompile it and replace the old A.dll the main application give me an error...
Any Idea what I have to do?? Is has anything to do with the COM interop??I have no idea about this!
In project properties there is Signing, what is this about??
I know I have many questions, but I'm new in this...
thanks a lot!!!
alba
|
|
|
|
|
When you early bind to a .DLL from another project, part of the fully qualified name in the binding is the assembly version number. The code doesn't just look for the correct filename. It also looks for the correct version is was bound to.
It has nothing to do with COM Interop.
What you have to do is redirect that binding to the version of the assembly you want it to use. Look in this article[^]. What you're looking for is "BindingRedirect".
|
|
|
|
|
But what I need is be able to change the version of a .dll and don't have to recompile the main application... Is there any way to do that??
Thanks!!
alba
|
|
|
|
|
You didn't read the article, did you? You don't recompile the application. You modify the app's config file and add the BindingRedirect section to tell the loader what the old and new version numbers of the .DLL are. Any binding that goes to the old .DLL version would get redirected to the new version number.
All you do is rename the old .DLL, copy in the new one, then make the BindingRedirect changes. Done.
|
|
|
|
|
Don't put this .DLL in the GAC. If it's application specific, Microsoft actually recommends against doing this.
|
|
|
|
|
Why don't you just assign a strong name to the assembly and install it to the Globle Assembly Cache. This won't only improve the performance of your Application but also allows you to change anything in the assembly without worrying about the versioning conflict.
AliAmjad (MCP)
|
|
|
|
|
Do I have to Install it into the global caché assembly or can I just put it on the application folder??
thanks for ur help!!!
alba
|
|
|
|
|
No install it in the Globle Assembly Cache because CLR actually first explore the assemblies installed in the GAC so It'll be able to discover the assembly in the early stages this way the performance of your application will increase more and you don't have to worry about the version of your application.
AliAmjad (MCP)
|
|
|
|
|
thanks for ur help!!
alba
|
|
|
|
|
Currently have a VB6.0 program that is used to monitor/control a device via a serial connection. It is constantly polling the device to keep data up to date and to keep the communication link active.
My problem is finding a reliable way to access the data via an external program (written in C++)(ProgC++). The previous programmer has been using "SendMessage" to send information to the VB6.0 program(ProgVB) and setup portions of device but his way of addressing getting information back from the program doesn't work. He was trying to use a similiar "SendMessage" approach but didn't take into account that the SendMessage from ProgC++ until the SendMessage from ProgVB finishes and that will only finish once ProgC++ reads it and acts on it. So it gets stuck in a cycle where neither program will run until the other finishes. Thought of using PostMessage but run into the issue where the data may not be valid in time for me to use it since PostMessage never reports when the message has been handled like SendMessage does. Is there a way to build external subroutines into VB6.0 that I can access from outside of the program?
Thanks,
George
|
|
|
|