logo       

RE: Problem With ASP-MYSQL: msg#00129

db.mysql.windows

Subject: RE: Problem With ASP-MYSQL

> i tried the following examples, but I encountered the
> following error message:s
> Unknown database 'mydsn' in the file mysqlconn.asp,


Try something like this:

Dim cnTemp
Dim strConnectionString

Set cnTemp = Server.CreateObject("ADODB.Connection")

strConnectionString = "Driver={MyODBC 3.51};"
strConnectionString = strConnectionString & "SERVER=pdc.something.com;"
strConnectionString = strConnectionString & "UID=username;"
strConnectionString = strConnectionString & "PWD=password;"
strConnectionString = strConnectionString & "DATABASE=databasename;"
strConnectionString = strConnectionString & "OPTION=16401;"
cnTemp.Open strConnectionString

The "Driver" part must match which MyODBC drive you are using.

You can also just make the connect string: "DSN=mydsn" if the DSN is
set up correctly in the control panel.

-Kevin


---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"; before
posting. To request this thread, e-mail win32-thread10598@xxxxxxxxxxxxxxx

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail win32-unsubscribe@xxxxxxxxxxxxxxx instead.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise