ADO Connection inside a component?

Results 1 to 2 of 2

Thread: ADO Connection inside a component?

  1. #1
    Sean Fagan Guest

    Default ADO Connection inside a component?

    I have a simple component that Just gets some info and throws it to a database. When i call the trackhim function it says that an object is required. I call it in an ASP like this<BR><BR>set tracer = Server.CreateObject("trackusers.track")<BR>tracer. trackhim &#060;--- error on this line. with or without ()<BR><BR>The code for the .DLL looks like this:<BR><BR>Public Function onstartpage(sc As ScriptingContext)<BR>Set ser = sc.Server()<BR>Set req = sc.Request()<BR>Set ses = sc.Session()<BR>End Function<BR>Public Function trackhim()<BR>Set conn = ser.CreateObject("ADODB.Connection")<BR>conn.Conne ctionTimeout = 15<BR> "Provider=*****;DSN=****;UID=******;PWD=******"<BR >conn.CommandTimeout = 120<BR>sql = "INSERT TrackUserPages (username,ipaddress,page,sessionID) VALUES "<BR>sql = sql & "(&#039" & ses.Session("username") & "&#039,&#039"<BR>sql = sql + req.servervariables("REMOTE_ADDR") & "&#039,&#039"<BR>sql = sql + req.servervariables("SCRIPT_NAME") & "&#039,&#039"<BR>sql = sql + ses.sessionid & "&#039)"<BR>conn.execute (sql)<BR>End Function<BR><BR>Thanks for your help

  2. #2
    Sean Fagan Guest

    Default RE: ADO Connection inside a component?

    I think i might be going about this all wrong but i thought i would try it like this. Tahsnk again for your help....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts