I need to use variables in an insert command due to the length and because the values are from another page that I use Request.QueryString to fill the variables changes. Below is a basic example I am trying to use. I recieve an error that Variable 'CUSTVALUES' is not found.
'Here I setup my connection and recordset
NOTE: I realize a recordset is not neccesary for the insert command but if I don't use it I get the error "Cannot update the cursor".
'This is how I set the variables from the refering page
DIM qfname
qfname = Request.QueryString("qfname")
'Here I set the two variables for my insert command
Dim CustFields
CustFields = "fname"
Dim CustValues
CustValues = "qfname"
InsertSql = "insert into customers (Custfields) values (CustValues)"
Conn.execute Insertsql
Obviously I am using mutiple values. I merely added one to explain it easier. Can you use variables in the insert command? I really would rather not use the addnew command so my code will remain shorter and easier to read. By the way I am using a DNSless connection and a Visual Foxpro database setup in my global.asa in the application onstart.
Thanks in advance
Mike Cox
zorfox@acceleration.com