Topic awaiting preservation: sql statement error |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: NZ |
posted 10-17-2003 06:24
Hi, guys. Error messages says: code: ID = Request.Form("ID")
|
Bipolar (III) Inmate From: New Jersey, USA |
posted 10-17-2003 09:54
You included an extra comma at the end of your second line which would cause an error. This is the way that it should look |
Paranoid (IV) Inmate From: NZ |
posted 10-20-2003 00:09
Hi, mate. thanks for your reply. code: ID = Request.Form("ID")
|
Paranoid (IV) Inmate From: PA, US |
posted 10-20-2003 00:26
This should work.... I think : code: sql = "UPDATE tblWine SET name =" & Request.Form("name") & ", price =" & Request.Form("price") & "WHERE ID=" & ID
|
Paranoid (IV) Inmate From: NZ |
posted 10-20-2003 01:31
hi, mate. Many thanks for your reply. quote:
|
Paranoid (IV) Inmate From: PA, US |
posted 10-20-2003 03:49
woops, put a space between the quotes and WHERE. That should fix it, I tested it out on my server. |
Paranoid (IV) Inmate From: NZ |
posted 10-20-2003 05:58
Hi, mate. Thanks a lot for your replies. code: sql = "UPDATE tblWine SET name="&Request.Form("name")&",price="&Request.Form("price")&"WHERE tblWine.[ID]="&ID
|
Bipolar (III) Inmate From: New Jersey, USA |
posted 10-20-2003 09:48
sql = "UPDATE tblWine SET name=" & Request.Form("name") & ",price=" & Request.Form("price") &" WHERE tblWine.[ID]=" & ID |
Paranoid (IV) Inmate From: NZ |
posted 10-21-2003 00:09
Hi, mate. Thanks for your replies. sorry about my siliness. code: Sub Update_Record()
|
Bipolar (III) Inmate From: New Jersey, USA |
posted 10-21-2003 12:21
I am thinking the error message refers to the bad SQL Sytax. You have incorporated the space before the WHERE clause, but you still have the comma after the price update statement. Let me see if I can put in what everyone has said. |
Paranoid (IV) Inmate From: NZ |
posted 10-21-2003 22:59
hi,mate. Thanks for your words. I really appreciate that. code: sql="UPDATE tblWine SET "
|