bigdude
09-23-2002, 07:00 AM
hello
using mysql server with asp and jscript
it looks like the jscript doesn't like "" around variables in the insert string....
can anyone help me on how to get the value of a variable into this?
here are some things i've tried:
var insertBird=Request.Form("txtBird");
result=conn.Execute("INSERT INTO birds VALUES('$insertBird$')");
// database gets "$insertBird$"
result=conn.Execute("INSERT INTO birds VALUES('$insertBird')");
// database gets "$insertBird"
result=conn.Execute("INSERT INTO birds VALUES('insertBird')");
// database error that there is no col "insertbird"
result=conn.Execute("INSERT INTO birds VALUES('"insertBird"')");
// jscript error that it expects ";" after "('"
anyone help on this?
thanks in advance
using mysql server with asp and jscript
it looks like the jscript doesn't like "" around variables in the insert string....
can anyone help me on how to get the value of a variable into this?
here are some things i've tried:
var insertBird=Request.Form("txtBird");
result=conn.Execute("INSERT INTO birds VALUES('$insertBird$')");
// database gets "$insertBird$"
result=conn.Execute("INSERT INTO birds VALUES('$insertBird')");
// database gets "$insertBird"
result=conn.Execute("INSERT INTO birds VALUES('insertBird')");
// database error that there is no col "insertbird"
result=conn.Execute("INSERT INTO birds VALUES('"insertBird"')");
// jscript error that it expects ";" after "('"
anyone help on this?
thanks in advance