Click to See Complete Forum and Search --> : Update Statement
June 19th, 2000, 04:22 AM
Hi, can anyone help me debug the following erroneous sql code for updating a particular record?
sql = "Update Table1 Set Location = '" & Trim(Text1.Text) & "', " & _
"Remarks = '" & Trim(Text2.Text) & "' " & _
"Where " & _
"Title = '" & Title & "' And " & _
"Author = '" & Author & "'"
Thanx.
RobZeilinga
June 20th, 2000, 09:49 AM
I can't see anything Wrong, What error is SQL returning? what type of fields are location & remarks?
June 20th, 2000, 02:40 PM
If you are executing this query in MS Access, you need to add a semi colon to the end of the sql. Update ... Where Title = 'Title here';
June 21st, 2000, 12:02 AM
Hi,
thanks for your responses. My sql statement is run from vb, and the entire error msg goes like this "Run time error '-2147217900(80040E14)': [Microsoft][ODBC Microsoft Access 97 Driver] Syntax error in Update statement". Location field is numeric (Long Integer) whereas Remarks field is a memo field.
Thanx.
Lothar Haensler
June 21st, 2000, 01:09 AM
since 'Location' is numeric, you shouldn't put single quotes around it.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.