Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL connection from VB.Net

Status
Not open for further replies.

GWHicks

Programmer
Dec 11, 2002
39
US
I have an application I am creating in VB.Net and I had it connecting fine to my database and was working on the program internals when I got a new laptop and migrated my application development to that system. Now when I run my application I get the following error:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in Quoting.exe

Additional information: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

But I have not changed anything in my connection strings or program since it was working. I am thinking there may have been a reference in VB.Net that I need to make or something else to add to my system but I can't for the life of me figure out what it is.

The database is not local, I actually have 2 different databases I was using for testing methods, one was across the internet, the other was on my LAN on a Linux box. I don't want to install a local server on my system because that is not how my users will be connecting. If anyone has any ideas what I might need to add to my system or where I might be missing something it would be greatly appreciated.
Greg Hicks Greg Hicks
VB.Net (Newbie) Programmer
 
Sounds like it is looking for an ODBC driver and a DSN entry - you may want to check you have installed myodbc and setup your DSN (control panel / administrative tools / data sources (ODBC)) entries as you had them on your old machine.

 
Thanks for the input it is starting to jog my memory. Is there a MySQL driver I have to download? And then am I going to have to do this for each person who uses my program? I want my install program to make it fully functional out the gate, so will I have to do more tweaking to my install settings in order to make that happen? Thanks for your help, most sites I find I can't seem to locate a step-by-step tutorial for making a connection to a MySQL server, but there are plenty for everything else.
Greg Hicks Greg Hicks
VB.Net (Newbie) Programmer
 
Thank you!!! That is what it was. So there is no way to incorporate the ODBC setup into my setup? My users will have to install that as well seperately? There must be a better way to handle that!
Greg Hicks Greg Hicks
VB.Net (Newbie) Programmer
 
That is an involved question that you are the best one to answer. We can't know what method you are using for packaging your app for distribution.

The MyODBC driver is available in a DLL-only zip file which contains a batch file to install the drivers, it should not be difficult to package the necessary DLLs with your app and reconfigure your install system to include them.

MyODBC is distributed under the LGPL license, so you can redistribute them. You will have to attribute the authors of the software. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top