Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error!?

Status
Not open for further replies.

leadman

Programmer
Joined
Jun 11, 2001
Messages
177
Location
US
Hi all,
Can anyone find the syntax error in this query I'm trying to run? Here is the query followed by the error I'm getting. (the gbdate field in the database has a field type of date/time):

Code:
<cfquery name=&quot;addcomments&quot; datasource=&quot;mydb&quot; dbtype=&quot;ODBC&quot;>
INSERT INTO guestbook (gbname, gbemail, gbhomepage, gbcity, gbstate, gbcountry, memocomments, gbdate)
VALUES ('#form.gbname#', '#form.gbemail#', '#form.gbhomepage#', '#form.gbcity#', '#form.gbstate#', '#form.gbcountry#', '#form.memcomments#', #CreateODBCDateTime(Now())#
</cfquery>


ODBC Error Code = 37000 (Syntax error or access violation)

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (2:1) to (2:65).

 
you have got a missing ) at the end of the query after #CreateODBCDateTime(Now())#
 
oh my - thank you *grin*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top