|
-
June 19th, 2000, 04:22 AM
#1
Update Statement
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.
-
June 20th, 2000, 09:49 AM
#2
Re: Update Statement
I can't see anything Wrong, What error is SQL returning? what type of fields are location & remarks?
-
June 20th, 2000, 02:40 PM
#3
Re: Update Statement
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
#4
Re: Update Statement
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.
-
June 21st, 2000, 01:09 AM
#5
Re: Update Statement
since 'Location' is numeric, you shouldn't put single quotes around it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|