Forums

ASP

This topic is locked

Differences in syntax between access and mysql

Posted 09 May 2003 16:22:35
1
has voted
09 May 2003 16:22:35 Andrew williams posted:
Hi people, this works fine in access + IIS, but when i try it on Mysql it produces a syntax error. Anybody now how to correct it?

<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset"
Recordset2.ActiveConnection = MM_tissue1_STRING
Recordset2.Source = "SELECT * FROM users WHERE UserName = '" + Replace(Recordset2__MMColParam, "'", "''" + "' AND DateDiff ('h',now(), Epirydate) > 3"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>

Edited by - andywill23 on 09 May 2003 16:23:03

Replies

Replied 09 May 2003 17:22:32
09 May 2003 17:22:32 Owen Eastwick replied:
I don't know the MySQL syntax but DateDiff is a VB/Access/SQL Server function, you need to find the MySQL equivalent.

Regards

Owen.

-------------------------------------------------------------------------------------------
Used programming books and web development software for sale (UK only): www.tdsf.co.uk/tdsfdemo/Shop.htm

Developer services and tutorials: www.drdev.net

Multiple Parameter UD4 / Access 2000 Search Tutorial: www.tdsf.co.uk/tdsfdemo/
Replied 09 May 2003 21:19:33
09 May 2003 21:19:33 Brent Colflesh replied:

Reply to this topic