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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database connection error

Status
Not open for further replies.

GhostWolf

Programmer
Jun 27, 2003
290
US
I've installed MySQL on our web server, (Windows Server 2008 r2), and developed a web site which pulls data from that database. From my development IDE, (VS '08 running on Windows XP), the web site behaves as it should, showing exactly what it's supposed to - but...

Once the web site is installed on the server, it receives an "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" error message when it tries to connect to the database.

To verify that the ODBC driver is installed on the server, I went into Administrative Tools/Data Sources (ODBC) and created a System DSN using the MySQL ODBC driver referenced by the web site's web.config - which tested successfully.

The connection string is the same whether it's on my development machine or the server:
connectionString="Driver={MySQL ODBC 5.1 Driver};Server=[servername];Database=[databasename];uid=[userid];pwd=[password];"

Thinking that the Server clause might be the problem, I've tried the server's IP address, localhost, and even added the Port clause - all to no avail.

The server is a 64-bit machine; MySQL ODBC driver version is 5.1.10.

I'd sure appreciate any guidance in getting this thing to work on the server...

 
Resolved!

I ended up changing the program to use the MySQL .NET connector instead of ODBC. It may be due to the connector version I used, (v2.0), but the first limitation I've run into - and don't like - is that the connector allows only one open datareader per connection.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top