471,090 Members | 1,357 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,090 software developers and data experts.

myODBC command syntax for SELECT statement...

I'm trying to do what I thought was a fairly simple thing, select a group of
records from a mySQL database.
I'm not much of an SQL guy. The syntax I would use for Microsoft SQL is
shown on the "query =" line.
A myODBC error message indicates this is not supported syntax.
Can anyone help me?

{ ADO Startup Values and Creation using the .Open method}

{Create a COM object reference to ADO Recordset.}
recordset = COM_CreateObject("ADODB.Recordset");

{ Open a Recordset }
query = "SELECT * FROM t_course_date
WHERE(modified>=CONVERT(DATETIME,'1999-07-31 00:00:00',102))";
("modified" field above is a mySQL field name)

recordset.Open(query, 'connection id', adOpenDynamic,adLockOptimistic); <--
This statement fails...

Thanks
Chris R.
Jul 19 '05 #1
0 1435

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Tim Hastings | last post: by
reply views Thread by Dominikus Zimmerer | last post: by
51 posts views Thread by WindAndWaves | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.