Forum Moderators: coopster & phranque

Message Too Old, No Replies

Incorrect syntax near '['

Incorrect syntax near '['

         

ice

12:27 am on Mar 13, 2002 (gmt 0)



I have another problem here. I really cannot find any error, Can anyone please help!

explorer say:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '['.

databaseo.asp, line 493

line1 says: <SCRIPT LANGUAGE="JavaScript" RUNAT="Server">

line 493 says: rsRecordSet.Open(strSQL, cnDBConnection, adOpenKeyset, adLockOptimistic, adCmdText);

bmcgee

12:32 am on Mar 13, 2002 (gmt 0)

10+ Year Member



What is the contents of strSQL?

Something in your query has bad syntax presumably. Dump out strSQL right before that executes and paste in here for us.

ice

2:42 am on Mar 13, 2002 (gmt 0)



strSQL is as follows:

var strSQL = "";
strSQL += "SELECT * FROM ";
strSQL += config.ADMINSETTING_DatabaseTable;
strSQL += " WHERE ";
strSQL += config.DATABASE_FieldDateCreated;
strSQL += " = {d '";
strSQL += dtDateCreated.getODBCNormalisedDate ();
strSQL += "'}";