View Single Post
  #3 (permalink)  
Old September 24th, 2003, 05:24 AM
jacob jacob is offline
Friend of Wrox
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts

Well, I found it pretty quickly. It is something like this...

Dim SomeDB
Set SomeDB = Server.CreateObject ("ADODB.Connection")
SomeDB.Open ("DRIVER=mysql;SERVER=[servername];UID=[username];PWD=[password];DATABASE=[databasename]")

Dim recTmp
Set recTmp = Server.CreateObject ("ADODB.Recordset")
recTmp.Open "SELECT * FROM testtable", SomeDB

Loop While Not recTmp.EOF

Set recTmp = Nothing

Set SomeDB = Nothing
Be aware that you have to change the red parts in the above connection string with the right value, and naturally use you name for the table and column.

Actually the way I found out about this was in the book 'Professional ASP Data Access' (WROX) which has got a section on MySQL databases, and how to connect to these.

Hope this helps ;)

Reply With Quote