This topic is locked

insert a record error

3/17/2008 10:15:08 AM
ASPRunnerPro General questions
C
contacta author

Someone can help me ?
this instruction is not working
'** Insert a record into another table ****

strSQLInsert = "insert into access_log (remote_ip) values ("

strSQLInsert = strSQLInsert & "'" & Request.ServerVariables("remote_addr") & "')"
dbConnection.Execute strSQLInsert
TIA
Roberto

J
Jane 3/21/2008

Roberto,
to debug your code print SQL query on the page before executing:

'** Insert a record into another table ****

strSQLInsert = "insert into access_log (remote_ip) values ("

strSQLInsert = strSQLInsert & "'" & Request.ServerVariables("remote_addr") & "')"

Response.Write strSQLInsert
dbConnection.Execute strSQLInsert