Ask a Question related to ASP Database, Design and Development.
-
TomD #1
SQL Update problem
The following SQL statement is resulting in the error after it:
(pasted from IE window)
UPDATE Clients SET number = 300, name = 'Ace Lock', address1 = 'add1',
address2 = 'add2', city = 'city', state = 'pa', zip = '15222' WHERE id = 1;
Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft
JET Database Engine Description: Syntax error in UPDATE statement. in
c:\inetpub\wwwroot\kdaclients.php on line 40
When I take out the number and name fields, it works fine
UPDATE Clients SET address1 = 'add1', address2 = 'add2', city = 'city',
state = 'pa', zip = '15222' WHERE id = 1;
The number field is a number, the rest are text fields. Any input
appreciated.
TomD Guest
-
Update problem
Hi, I have installed DreamweaverMx6.0, and yesterday I've downloaded DWMX6.1 updater. But I encountered a problem when I installed the updater, ... -
inker problem (an update to the 'general problem')
i have my shockwave 3d project which i know on several machines makes the screen goes nuts, meaning it turns into 'safe mode' - 640*480, 256 colours... -
ASP Problem - will not update
Hi, Hope someone can help. The ASP below correctly gets the data out of the Access DB but when I click update it does not. Anything obviously... -
Update to 7.0.1 problem
Hello, I just want to update my Photoshop 7.0 to 7.0.1. But it doesn't work. During the setup I alwys become an error message: "The Adobe... -
apt-get update problem
Hello. I added entries to my sources.list, but i can't get the related packages : my sources.list -------------------------- deb... -
Nicole Calinoiu #2
Re: SQL Update problem
Tom,
When you use reserved words (e.g.: "name") as table or column names, you
need to wrap them in square brackets when using them in a Jet SQL statement.
e.g.:
UPDATE Clients SET [number] = 300, [name] = 'Ace Lock', address1 = ...
This allows the Jet SQL engine to recognize the names as identifiers rather
than mis-use of the reserved words. Of course, an even better approach is
to not use reserved words as table/column names in the first place...
HTH,
Nicole
"TomD" <dcbcadmgr.no@spam.yahoo.com> wrote in message
news:uwKThJj8DHA.2404@TK2MSFTNGP11.phx.gbl...> The following SQL statement is resulting in the error after it:
>
> (pasted from IE window)
>
> UPDATE Clients SET number = 300, name = 'Ace Lock', address1 = 'add1',
> address2 = 'add2', city = 'city', state = 'pa', zip = '15222' WHERE id =
> 1;
>
>
> Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft
> JET Database Engine Description: Syntax error in UPDATE statement. in
> c:\inetpub\wwwroot\kdaclients.php on line 40
>
>
> When I take out the number and name fields, it works fine
>
> UPDATE Clients SET address1 = 'add1', address2 = 'add2', city = 'city',
> state = 'pa', zip = '15222' WHERE id = 1;
>
> The number field is a number, the rest are text fields. Any input
> appreciated.
>
>
Nicole Calinoiu Guest
-
Bob Barrows [MVP] #3
Re: SQL Update problem
Nicole Calinoiu wrote:
Just to add:> Tom,
>
> When you use reserved words (e.g.: "name") as table or column names,
[url]http://www.aspfaq.com/show.asp?id=2080[/url]
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest



Reply With Quote

