I am trying to update an access database, and pulling my hair out. I swear I have everything right, im used to SQL not access so I could be missing something. Below is the code I am using...
set conn = Server.CreateObject("ADODB.Connection")
Conn.Open ("driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Inetpub\dosamigosdecor\db\aspcart5.mdb")
sql = "select dptid from idtable"
set rs = conn.execute(sql)
prodid = rs("dptid")
newval = prodid + 1
sql = "UPDATE idtable SET dptid='" & newval & "'"
conn.execute(sql)
The sql is outputting as UPDATE idtable SET dptid='330' and i have tried with and without ' but still no success. Can anyone see anything that is wrong?
Brad