Link to home
Start Free TrialLog in
Avatar of MKrauss
MKrauss

asked on

Mysql select statement with vbscript

Hi,
i'm using vbscript and would like to know how i could do the following ado statement to a mysql
server:

'used on a ms sql:
Set objDBConnection = CreateObject("ADODB.Connection")
sConnectionString  = "Provider=SQLOLEDB; Data Source=" & sSQLServer & "; Initial Catalog=" & sCatalog & "; User Id=user; Password=pass"
objDBConnection.Open sConnectionString
Set objRs = objDBConnection.Execute("SELECT field FROM table order by arg")
objRs.movefirst
Do While Not objRs.EOF
  .....
  objRs.movenext
 loop

Many thanks
Matt.
 
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MKrauss
MKrauss

ASKER

thanks, i came already to this stage but didnt had success before, somehow that works
only for me if i follow in detail your given sample from
http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForMySQL
including all the options, guess that was the problem.

One more thing, will this work with the latest mysql version 5 as well ?

Yes, this driver should compatible for latest mysql version 5.