Question : strange error

Hi,

Please see the code I have below.  When I run the code in SQL, it is fine, but when I run it in ASP.  I am getting

2Invalid column name 'ReportName'.

if I take out 'ReportName', I get

2Invalid column name 'LogTime'.

But I have another query on the same page, it runs fine....any ideas?  thx
1:
2:
3:
4:
5:
6:
7:
8:
sqlLogUpdate = "INSERT INTO dbo.UserLog (ReportName, LogTime, UserID, UserName, CompanyID) VALUES('" & Request.ServerVariables("URL") & "','" & now() & "'," & session("UserID") & ", '" & session("usernameIM") & "', " & Session("CompanyID") & ")"
	response.Write sqlLogUpdate
on error resume next
oConn.execute(sqlLogUpdate)
if(err.number<>0)then	
	Response.Write "2" & err.Description
	Response.End
end if

Answer : strange error

You probably just need table name as UserLog not dbo.UserLog.

/ Tobzzz
Random Solutions  
 
programming4us programming4us