Solved

SQL > Error -2147217900 "Syntax Error in UPDATE/INSERT

Posted on 2002-06-20
4
374 Views
Last Modified: 2010-05-18
An SQL statement that seems straightforward and has worked for months suddenly produces error -214721700 -- with the descriptor, Syntax Error in either "UPDATE" or "INSERT INTO...."  

I'm using VB6 & ADO to work with an Access 2000 db.

This only occurs in the "First", and "Last" fields of tblCustomers.  I can add or modify all the other fields --Phone, Cell, Company, Address, City, State, etc.

Have deleted and replaced the fields, altered all the field properties I can think of with no change in performance.

Searching the MS Knowledge Base doesn't seem to produce results that apply to Access.

By the way, the statements work just fine in Access 2000 (query builder) itself.

Arrggghhh!  Any suggestions?

0
Comment
Question by:Glen Gibb
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
TigerZhao earned 200 total points
ID: 7097995
“First" and "Last" is reserve keyword for Access2000, need chang the field name, OR maybe follow useage can pass syntax check:
Update tblCustomers
 Set [First] = 123
 ...
0
 
LVL 3

Expert Comment

by:PNJ
ID: 7098379
TigerZhao is correct. A Google search for 80040E14 (which is the hex equivalent of the negative decimal error code) gives this hit at the top of the list:

http://www.macromedia.com/support/ultradev/ts/documents/insert_into.htm

0
 

Author Comment

by:Glen Gibb
ID: 7100144
Your answer was square on the money.  Changed field names to "FirstName" and "LastName" and the db operations went smoothly.

I appreciate the Google hint, too.  Is this more effective than the MSKB?



0
 
LVL 3

Expert Comment

by:PNJ
ID: 7103213
Well, Google is far more wide reaching than the knowledge base - Microsoft only give answers about their own stuff.

Have a look at http://www.google.com/about.html and roam around the links - somewhere it tells you how Google works (sorry, I couldn't find it again!).

You "pays your money and takes your choice". I often start with a Google search because "3rd party" people make more balanced and candid judgements with problems about other suppliers, but search engines often don't (or aren't allowed to) dig deep into their web sites therefore won't get at all the information you may require.

Hint: Always convert a *big* decimal error code to hex and search on that - particularly if the resultant answer begins "800..."
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Restricting text box entry from \/:?<>"| 9 76
vb6 connector to mongodb 2 49
VBA: Select SQL query based on a config Sheet v2 11 38
vbModal 12 35
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now