God DAMM*! Why won't this work? Easy...

Results 1 to 3 of 3

Thread: God DAMM*! Why won't this work? Easy...

  1. #1
    Join Date
    Dec 1969

    Default God DAMM*! Why won't this work? Easy...

    Hello. here&#039s the error from using custom recordsets-an article on 4 guys that uses global.asa and code provided. I must be a retard.:<BR><BR>ADODB.Field error &#039 800a0bcd&#039 <BR><BR>Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record. <BR><BR>/visitors/track.asp, line 10 <BR><BR><BR>I am using code from an article on custom recordsets. What am I doing wrong? What am I not getting. I got it from the article, but it gives this error. I thought this was to not be used with database...what am I doing wrong? Thanks<BR><BR>Here&#039s the code:<BR><BR>&#060;%<BR> Dim customRS<BR> set customRS = Server.CreateObject("ADODB.Recordset")<BR>%&#062; <BR><BR>&#060;%customRS.Fields.Append "name", 20, 20 <BR><BR>customRS.Open <BR><BR>customRS("name") = blah <BR><BR>set customRS = Application("CustomRS") <BR><BR>&#039Lock the Application scope<BR>Application.Lock<BR><BR>&#039Get the row based on the Session("ID") for this user<BR>CustomRS.Find("ID = &#039" & Session("ID") & "&#039")<BR><BR>Response.Write "Your IP is " & CustomRS("IP")<BR><BR>&#039Unlock the Application Scope<BR>Application.UnLock<BR><BR>&#039Lock the Application scope<BR>Application.Lock<BR><BR>Response.Write "There are " & CustomRS.RecordCount & " visitors on-line right now!" <BR>&#039Unlock the Application Scope<BR>Application.UnLock<BR><BR>&#039Lock the Application scope...<BR>Application.Lock<BR><BR>&#039Move to the first record in our custom recordset<BR>CustomRS.MoveFirst<BR><BR>&#039Loop through the recordset...<BR>Do While Not CustomRS.EOF<BR> Response.Write "User: " & CustomRS("ID") & "<BR>"<BR> Response.Write "IP: " & CustomRS("IP") & "<BR>"<BR> Response.Write "Came on-line at: " & CustomRS("LogOn")<BR> Response.Write "&#060;P&#062;&#060;HR&#062;&#060;P&#062;"<BR> <BR> CustomRS.MoveNext<BR>Loop<BR><BR>&#039Unlock the application...<BR>Application.UnLock<BR><BR>%&#062 ;<BR><BR>

  2. #2
    Larrie Guest

    Default RE: God DAMM*! Why won't this work? Easy...

    Possibly the problem is in the line:<BR>set customRS = Application("CustomRS")<BR>This is overwriting the object you created above, with an object from the Application variables, which probably doesnot exist, so BOF or EOF are true.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Ok, so what should I do?

    Hey, thanks. My question is, how do I get it to work? This makes no sense as I have never needed to use them before. DO I STILL connect to a db? Where do I store the value?<BR><BR>It was created to pull live stats on visitors and more. A great article but this makes no sense. The code from the article was meant to be tweaked, I guess, but don&#039t know what I need to do. <BR><BR>THanks<BR><BR>Joel

Posting Permissions

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