Wednesday, August 9, 2006

ASP.NET database connection

There are few ways to connect a database. It's easy if it's Microsoft's product of course, you bet! VWD offers data source connection for

  • Access
  • ODBC
  • MS's SQL server
  • MS's SQL server database file
  • Oracle


I was struggling to connect to MySql because I have that in my Intranet here already that I want to play with.

Obviously 3rd party provider and MySql can't ignore the community running IIS and asp.net. You have few choices available
  1. MyODBC
  2. ODBC .net data provider (Open Databse Connectivity)
  3. MDAC (Microsoft Data Access Components, 2.8 Service Pack 2 believed to be current version)

  4. OLDDB.net provider which is not currently supported by MySql

  5. Corelab mySQLDirect .net data provider (free for 30 days)


I tried all the above and conclude that the ODBC method appears to be the easiest. I got as far as making a connection to my MySql database which is remotely on another intranet location. I got below which is something else not to do with the connection.

[SocketException (0x2afc): The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for]

No comments:

Post a Comment