Thursday, June 28, 2012

Display the results of any query in Classic ASP

Display the results of any query in Classic ASP:

    If rs.EOF Then
        %>No record found<%
    Else
        Response.Write "
"
        Response.Write ""
        For i = 0 to rs.Fields.Count -1
            Response.Write ""
            Response.Write ""
            Response.Write ""
            Response.Write ""
        Next
        Response.Write "
Login Info
" & GetFieldName( rs.Fields(i).Name, fGeekMode ) & "" & rs.Fields(i).Value & " 
"

        %>
       

        Note: "Minutes Logged In" is not accurate if the session is not active, or if the session is inactive,

        and the user didn't logout (i.e., they closed their browswer instead of clicking Logout).

       

       

        Click Here to Kill This Login Session

            You would want to kill a session if the user is getting Read-Only access, and does

            not want to wait for their current session to time-out. Beware, this will log out the user if

            they are still using this session.
        <%
    End If

PRE
    If rs.EOF Then
        %>No record found<%
    Else
        Response.Write ""
        Response.Write ""
        For i = 0 to rs.Fields.Count -1
            Response.Write ""
            Response.Write ""
            Response.Write ""
            Response.Write ""
        Next
        Response.Write "
Login Info
" & GetFieldName( rs.Fields(i).Name, fGeekMode ) & "" & rs.Fields(i).Value & " 
" %>
Note: "Minutes Logged In" is not accurate if the session is not active, or if the session is inactive,
and the user didn't logout (i.e., they closed their browswer instead of clicking Logout).
 
 
Click Here to Kill This Login Session
    You would want to kill a session if the user is getting Read-Only access, and does
    not want to wait for their current session to time-out. Beware, this will log out the user if
    they are still using this session. <% End If
End