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 > Whats wrong with this?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-13-04, 14:54
JPry565 JPry565 is offline
Registered User
 
Join Date: Aug 2004
Posts: 13
Angry 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.
Reply With Quote
  #2 (permalink)  
Old 08-14-04, 00:56
Seppuku Seppuku is offline
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.
Reply With Quote
  #3 (permalink)  
Old 08-14-04, 10:38
JPry565 JPry565 is offline
Registered User
 
Join Date: Aug 2004
Posts: 13
Unhappy 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.
Reply With Quote
  #4 (permalink)  
Old 08-14-04, 16:59
Seppuku Seppuku is offline
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.
Reply With Quote
  #5 (permalink)  
Old 08-15-04, 16:20
MrWizard MrWizard is offline
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
Reply With Quote
  #6 (permalink)  
Old 08-15-04, 16:48
Seppuku Seppuku is offline
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.
Reply With Quote
  #7 (permalink)  
Old 08-16-04, 12:13
JPry565 JPry565 is offline
Registered User
 
Join Date: Aug 2004
Posts: 13
I'll give that a try

I'll give that a try

Thanks
Reply With Quote
  #8 (permalink)  
Old 08-17-04, 14:39
JPry565 JPry565 is offline
Registered User
 
Join Date: Aug 2004
Posts: 13
It ocassionally works, it says operation must use an updatable query?
Reply With Quote
  #9 (permalink)  
Old 08-21-04, 15:28
JPry565 JPry565 is offline
Registered User
 
Join Date: Aug 2004
Posts: 13
Can somebody please help me?
Reply With Quote
  #10 (permalink)  
Old 08-21-04, 15:29
JPry565 JPry565 is offline
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.
Reply With Quote
  #11 (permalink)  
Old 08-22-04, 19:13
rokslide rokslide is offline
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.
Reply With Quote
  #12 (permalink)  
Old 08-22-04, 20:50
Seppuku Seppuku is offline
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.
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