![]() Topic awaiting preservation: sql statement error (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: NZ |
![]() Hi, guys. Error messages says: code: ID = Request.Form("ID")
|
Bipolar (III) Inmate From: New Jersey, USA |
![]() 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 |
![]() Hi, mate. thanks for your reply. code: ID = Request.Form("ID")
|
Paranoid (IV) Inmate From: PA, US |
![]() 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 |
![]() hi, mate. Many thanks for your reply. quote:
|
Paranoid (IV) Inmate From: PA, US |
![]() 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 |
![]() 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 |
![]() sql = "UPDATE tblWine SET name=" & Request.Form("name") & ",price=" & Request.Form("price") &" WHERE tblWine.[ID]=" & ID |
Paranoid (IV) Inmate From: NZ |
![]() Hi, mate. Thanks for your replies. sorry about my siliness. code: Sub Update_Record()
|
Bipolar (III) Inmate From: New Jersey, USA |
![]() 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 |
![]() hi,mate. Thanks for your words. I really appreciate that. code: sql="UPDATE tblWine SET "
|