Database Access in ASP.NET

G

Guest

Hi smart people (if any :)

I just simply want to access a database in asp.net and it simply does not work! In fact the database I want to use is MySQL but when I tried to connect to an Access database the same problem occurred. In the second case in fact, the same code worked in a Windows Application but did not in ASP.NET, while in the first case (MySQL) the code did not work at all! Here's part of my code trying to connect to a MySQL database

Dim ConnectionString = "Driver={MySQL ODBC 4.0.18 Driver};" &
"DataBase=mysql2;" &
"Server=mysql2.iranservers.org;" &
"Port=3306;" &
"Uid=iranser_ipadmin;" &
"Pwd=ip2loc2004I
DatabaseConnection = New System.Data.Odbc.OdbcConnection(ConnectionString
DatabaseConnection.Open(
DatabaseConnection.ChangeDatabase("iranser_ip2location"

Can anyone help
Thnx

Homayoon
 
G

Guest

ooops! I forgot to include the error message! Here it is

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specifie

Thnx again, Homayoon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top