I am having a problem with my insert values syntax.
Using MS SQL SVR 2K, ASP
Specifically, I have an single/double quote, and end of statement error. The below code gets me close, but inserts something wrong into the table (a single quote?) that causes an error when I attempt to view the data via a web page (asp):
oConn1.execute "insert into crimcivdetail (orderid, state) values ('"& orderid & "', '" & Request.form("State1") & "'"
And this causes similar errors:
oConn1.Execute "Insert into orderdetail (SubjectNumber, ClientID, ServiceNumber, "_
& "daterequested) values (" & subjectNumber & "', '" & Request.Form("COMPID")_
& "', 22 ,'" & "', GetDate())'"
Suggestions?
TIA,
Cole
Using MS SQL SVR 2K, ASP
Specifically, I have an single/double quote, and end of statement error. The below code gets me close, but inserts something wrong into the table (a single quote?) that causes an error when I attempt to view the data via a web page (asp):
oConn1.execute "insert into crimcivdetail (orderid, state) values ('"& orderid & "', '" & Request.form("State1") & "'"
And this causes similar errors:
oConn1.Execute "Insert into orderdetail (SubjectNumber, ClientID, ServiceNumber, "_
& "daterequested) values (" & subjectNumber & "', '" & Request.Form("COMPID")_
& "', 22 ,'" & "', GetDate())'"
Suggestions?
TIA,
Cole