ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UPDATE statement error...

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> SQL Programming (MS SQL Server, MS Access, MySQL)
View previous topic :: View next topic  
Author Message
Scott



Joined: 14 Oct 2004
Posts: 11

PostPosted: Tue Dec 07, 2004 11:20 am    Post subject: UPDATE statement error... Reply with quote

The following UPDATE SQL statement gives me an error:

Code:

UPDATE tblCustomers SET FirstName = "Paul", LastName = "Johnson" WHERE ID = 28



Here is the error:

Microsoft OLE DB Provider for ODBC Driverserror '80040e14'[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement

The database is MS Access 2000.

What is wrong with my UPDATE statement?



Thanks,
Scott
Back to top
View user's profile Send private message
trenton



Joined: 17 Nov 2004
Posts: 2

PostPosted: Tue Dec 07, 2004 2:49 pm    Post subject: Re: UPDATE statement error... Reply with quote

The problem is in the double quotes Smile. Replace all double quotes with single quotes and the UPDATE statement will run without a problem.


Trenton

Scott wrote:
The following UPDATE SQL statement gives me an error:

Code:

UPDATE tblCustomers SET FirstName = "Paul", LastName = "Johnson" WHERE ID = 28



Here is the error:

Microsoft OLE DB Provider for ODBC Driverserror '80040e14'[Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement

The database is MS Access 2000.

What is wrong with my UPDATE statement?



Thanks,
Scott
Back to top
View user's profile Send private message
administrator
Site Admin


Joined: 01 Oct 2004
Posts: 183

PostPosted: Tue Dec 07, 2004 3:19 pm    Post subject: Reply with quote

Yes, using double quotes in a SQL statement is a very common problem Smile.
Just replace the double quotes with single ones and you should be good to go.



Cheers,
_________________
Peter
ASP & ASP.NET Articles and Tutorials
Back to top
View user's profile Send private message
Scott



Joined: 14 Oct 2004
Posts: 11

PostPosted: Tue Dec 07, 2004 3:28 pm    Post subject: Reply with quote

Thanks guys Wink

The UPDATE statement work perfect now...



Scott
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> SQL Programming (MS SQL Server, MS Access, MySQL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial