
October 23rd, 2003, 06:48 PM
|
|
Junior Member
|
|
Join Date: Oct 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Syntax error in UPDATE statement MS Access/ASP
Hi folks,
I'm an ASP newbie and I'm trying to update an Access table based on a compare between two tables. I get a syntax error that I cannot figure out. From what I know about Access this should work (and does when run directly in Access). Here is the line of code that is getting the syntax error:
oConn.Execute strCommand
where the strCommand = "UPDATE Times SET Times.[10:30 AM] = " & strUpdate & " WHERE (([Times]![DATE]=CDate([Reservations]![PartyDate])));"
oConn = the connection string that is working since I can add records to the Reservations table successfully and Response.Write records back out of it.
strUpdate="Test"
when I Response.Write the strCommand, I get: UPDATE Times SET Times.[10:30 AM] = "Test" WHERE (([Times]![DATE]=CDate([Reservations]![PartyDate]))); which looks fine to me.
Can anyone find a syntax error here? Thanks in advance.
Sean
|