Results 1 to 3 of 3

Thread: global.asa

  1. #1
    Join Date
    Dec 1969

    Default global.asa

    I am trying to use global.asa to save session variables into an access database. Here is my code:<BR><BR>&#060;SCRIPT LANGUAGE=VBSCRIPT RUNAT=SERVER&#062;<BR><BR>Sub Session_onStart()<BR> <BR> &#039create connection objects<BR> set objConn=Server.CreateObject ("ADODB.Connection")<BR> set objRec=Server.CreateObject ("ADODB.Recordset")<BR><BR>dbPath=Server.mappath(" webdatabase.mdb")<BR><BR><BR> &#039make a DSNless connection to the database<BR> strConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & dbPath<BR><BR> &#039open objects<BR> objConn.Open strConnect, "WebUser", " "<BR> objRec.Open "tblSession", strConnect, adOpenKeyset, adLockPessimistic<BR><BR><BR>objRec.AddNew<BR>objR ec("URL")=Request.ServerVariables("URL")<BR>objRec ("Referer")=Request.Form("HTTP_REFERER")<BR>objRec ("RemoteHost")=Request.Form("REMOTE_HOST")<BR>objR ec("UserAgent")=Request.Form("HTTP_USER_AGENT")<BR >objRec("UALanguage")=Request.Form("HTTP_ACCEPT_LA NGUAGE")<BR>objRec("HostIP")=Request.Form("LOCAL_A DDR")<BR>objRec.Update<BR>objRec.Close<BR><BR><BR> Set ObjRec=Nothing<BR>Set objConn=Nothing<BR><BR>End sub<BR><BR><BR>&#060;/SCRIPT&#062;<BR><BR>Upon running the code, I am getting this error message. <BR><BR>------------------<BR>ADODB.Recordset error &#039 800a0bb9&#039 <BR><BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR><BR>/lqcollege/global.asa, line 17 <BR>------------------------<BR><BR>I believe this is because I have not included file As I can&#039t include in global.asa, I don&#039t know where to put it and I am stuck. Or may be there is someother solution to this problem. Please help.<BR>

  2. #2
    Mike B Guest

    Default RE: global.asa

    One way may be to just take out the values that you need in and include only those at the top of global.asa. Not very pretty but it should work. <BR><BR>You can also just type in the integer equivalents in global.asa.<BR><BR>Hope this helps<BR><BR>Mike

  3. #3
    Join Date
    Dec 1969

    Default RE: global.asa

    Try including the two files in a seperate page. One on top of the other.

Posting Permissions

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