I've got an Access database that I'm trying to update some data in. I'm re-using code that is working on other pages, so this is very peculiar. The page gets the data and the number of records sent from another page. The code looks like this:
nombre=Request.Form("nombre"
For a=1 to nombre
data1=Request.Form("data1"
data2=Request.Form("data2"
id=Request.Form("id"
SQL="Update MyTable Set Data1='"&data1
SQL=SQL+"',Data2='"&data2&"' Where [ID]="&id
MyConn.Execute(SQL)
Next
If I remove the "MyConn.Execute(SQL)" statement and add "Response.Write(SQL)", I can see that the SQL statements looks perfect, exactly like I want them. It's just that they don't work. Both "data1" and "data2" are in text format. I really need help, needed this done yesterday. Please, help me. Every advice, solution, or idea is of interest. Thx.
nombre=Request.Form("nombre"
For a=1 to nombre
data1=Request.Form("data1"
data2=Request.Form("data2"
id=Request.Form("id"
SQL="Update MyTable Set Data1='"&data1
SQL=SQL+"',Data2='"&data2&"' Where [ID]="&id
MyConn.Execute(SQL)
Next
If I remove the "MyConn.Execute(SQL)" statement and add "Response.Write(SQL)", I can see that the SQL statements looks perfect, exactly like I want them. It's just that they don't work. Both "data1" and "data2" are in text format. I really need help, needed this done yesterday. Please, help me. Every advice, solution, or idea is of interest. Thx.