| |
|
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.
|
 |

08-13-04, 14:54
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 13
|
|
Whats wrong with this?
|
|
<%
dim A
dim B
dim C
dim D
dim E
dim F
dim G
dim H
dim strdbpath
A = Request.Form("Number")
B = Request.Form("Nickname")
C = Request.Form("Description")
D = Request.Form("Category")
E = Request.Form("AskingPrice")
F = Request.Form("Condition")
G = Request.Form("Sold")
H = Request.Form("OrigID")
strDBPath = Server.MapPath("main_processing.mdb")
Set oConn2 = Server.CreateObject("ADODB.Connection")
oConn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"
oConn2.Execute ("UPDATE Results SET Number = '222', Nickname = '2222', Description = '22222', Category = '22222', AskingPrice = '2222', Condition = '22222', Sold = '22222' WHERE ID = 2")
%>
This is my code, I always get a "SYNTAX ERROR IN UPDATE QUERY" can somebody please help?
Thanks so much...
|
Last edited by JPry565; 08-13-04 at 14:58.
Reason: Forgot to say thanks.
|

08-14-04, 00:56
|
|
Useless...
|
|
Join Date: Jul 2003
Location: SoCal
Posts: 721
|
|
Try it without the parenthesis:
oConn2.Execute "UPDATE Results SET Number = '222', Nickname = '2222', Description = '22222', Category = '22222', AskingPrice = '2222', Condition = '22222', Sold = '22222' WHERE ID = 2"
__________________
That which does not kill me postpones the inevitable.
|
|

08-14-04, 10:38
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 13
|
|
Still dosen't work.
|
|
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/Desk01/dym3.asp, line 58
I'm still getting this error, I'm sure that my SYNTAX is right.
Please Help.
Thanks.
|
|

08-14-04, 16:59
|
|
Useless...
|
|
Join Date: Jul 2003
Location: SoCal
Posts: 721
|
|
Are all of your columns text columns?
__________________
That which does not kill me postpones the inevitable.
|
|

08-15-04, 16:20
|
|
Registered User
|
|
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
|
|
This error sometimes is caused by a table name or field name that is a reserved word. I'm not fully aware of all the reserved words, but to see if this is the cause, try renaming your table and fields and see if that makes any difference. I would start by renaming the table first.
Tim
__________________
Tim
|
|

08-15-04, 16:48
|
|
Useless...
|
|
Join Date: Jul 2003
Location: SoCal
Posts: 721
|
|
Quote:
|
Originally Posted by MrWizard
This error sometimes is caused by a table name or field name that is a reserved word. I'm not fully aware of all the reserved words, but to see if this is the cause, try renaming your table and fields and see if that makes any difference. I would start by renaming the table first.
|
That's a good point. You can put your tables and columns in brackets [ ] to tell the interpreter not to use them as keywords:
UPDATE [Results] SET [Number] = '222', [Nickname] = '2222', [Description] = '22222', [Category] = '22222', [AskingPrice] = '2222', [Condition] = '22222', [Sold] = '22222' WHERE [ID] = 2
__________________
That which does not kill me postpones the inevitable.
|
|

08-16-04, 12:13
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 13
|
|
|
I'll give that a try
I'll give that a try
Thanks
|
|

08-17-04, 14:39
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 13
|
|
It ocassionally works, it says operation must use an updatable query?
|
|

08-21-04, 15:28
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 13
|
|
Can somebody please help me?
|
|

08-21-04, 15:29
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 13
|
|
MOD EDIT: No need for the abuse. You have been warned.
|
Last edited by JonathanB; 08-22-04 at 07:09.
|

08-22-04, 19:13
|
|
Registered User
|
|
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
|
|
If it is working sometimes and not working at others I would suggest it has something to do witht eh state of the database or any locks you might have on the tables or the particular record.
Can you give us any idea when it works and when it doesn't work?
At a guess I would say this would fail if the table was open in Access or if you were viewing the record in Access, but should work at all other times.
|
|

08-22-04, 20:50
|
|
Useless...
|
|
Join Date: Jul 2003
Location: SoCal
Posts: 721
|
|
Access is finicky. Since it was not designed to be a high performance DB, it often has problems with multiple insert/updates that occur simultaneously.
__________________
That which does not kill me postpones the inevitable.
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|