If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Update multiple records

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-06, 01:46
iamjosh iamjosh is offline
Registered User
 
Join Date: Feb 2004
Posts: 19
Update multiple records

I'm trying to update many records in a database with the following statement.
Seams it isn't going to be as easy as...


Update = "UPDATE vpo STATUS=PENDING WHERE STATUS=APPROVED"
Conn.Execute( Update)


I get this error..

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
line 9


Line 9 is the update statement, any one have some easy other ways to do this?
Reply With Quote
  #2 (permalink)  
Old 07-10-06, 01:56
pbaldy pbaldy is offline
Registered User
 
Join Date: May 2005
Location: Nevada, USA
Posts: 2,475
As the error indicates, the syntax of your SQL is wrong. I note you've posted update SQL on other threads with the correct syntax, so you may want to revisit that (hint: SET). I'd guess you're also going to need single quotes around PENDING and APPROVED.
__________________
Paul
Reply With Quote
  #3 (permalink)  
Old 07-10-06, 11:52
iamjosh iamjosh is offline
Registered User
 
Join Date: Feb 2004
Posts: 19
Wow.. guess I'd been coding for too long, I can't believe I missed that.. Thanks.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On