Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting variables into database

Status
Not open for further replies.

sq000

Technical User
Jul 15, 2001
3
GB
hi im trying to get variables into a database,
can anyone see anything obviousley wrong with this code?
the problem seems to be in the "insert" i would be very greatful for any help

var Command1 = Server.CreateObject("ADODB.Command");
Command1.ActiveConnection = MM_lostat_STRING;
Command1.CommandText = "INSERT INTO tblStats (Recorded, RemoteAddress, HttpReferer, HttpUserAgent, WebPage) VALUES ('" & Request("date") & "', '" & Request("REMOTE_ADDR") & "', '" & Request("HTTP_REFERER") & "', '" & Request("HTTP_USER_AGENT") & "', '" & Request("URL") & "') ";
Command1.CommandType = 1;
Command1.CommandTimeout = 0;
Command1.Prepared = true;
Command1.Execute();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top