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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error in WHERE Clause 1

Status
Not open for further replies.

Bodhi147

MIS
Jan 24, 2003
17
US
Can't fix this error in my Sql statment. Please help

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'WHERE'.



SQLStmt = "UPDATE Drawing_MAIN Set User_ID_Eng ='"+struser+"', Customer_ID ="+strcustomer+", "
SQLStmt = SQLStmt + "Contact_ID ="+strContactID+","
SQLStmt = SQLStmt + "Date_Entered = '"+session("DateEntered")+"', Date_Needed ='"+Session("DateNeeded")+"', "
SQLStmt = SQLStmt + "Date_Estimated_Completion ='"+strdateestcomp+"', Draw_Process ="+Session("Process")+", "
SQLStmt = SQLStmt + "Drawing_Type ="+strDrawingtype+", Project_Number ='"+strprojectnumber+"', "
SQLStmt = SQLStmt + "Drawing_Number ='"+strdrawingnumber+"', RFQ_Request_Number ="+strrequestnumber+", "
SQLStmt = SQLStmt + "Part_Number ='"+strpartnumber+"', Revision_Reason ='"+strreason+"', Request_Status ="+strdrawingstatus+", Priority = '" + strPriority + "',"
SQLStmt = SQLStmt + " Item ="+strItem+", Ack = " + strAck + ", AssignedTo = '" & strAssignedTo & "', AcknowledgedDate = '"+strAckDate+"',"

SQLStmt = SQLStmt + "WHERE Drawing_Request_Number = "+strdrwReqNum+""


 
You've got an comma before the WHERE

strAckDate+"',"

Maybe a space before WHERE--> " WHERE will help after you fix that. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top