Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using variables in ASP Insert command
Message
De
29/12/2000 02:31:09
 
 
À
Tous
Information générale
Forum:
Internet
Catégorie:
Active Server Page
Titre:
Using variables in ASP Insert command
Divers
Thread ID:
00457683
Message ID:
00457683
Vues:
65
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform