Results 1 to 3 of 3

Thread: [RESOLVED] classic asp help please

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    Canton, GA
    Posts
    487

    Resolved [RESOLVED] classic asp help please

    Can someone tell me what I am doing wrong? I am trying to use a querystring to query my DB. If the record is there then continue else do nothing...

    Here is my code:

    Code:
    <!-- #include file="connection/connection.inc"-->
    
    <%
    	  idstring = Request.QueryString("t")
    	  
          <%
      Dim rs
      set rs=Server.CreateObject("adodb.recordset")
      
      rs.open = select * from table where field = '" & idstring &"'",strcon,3,3
    
    
      If rs.EOF Then
        'No Record in the DB
      Else
        'Record in the DB
      End If
    %>
    Thank you so much for your help!!

  2. #2
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Re: classic asp help please

    So what is your error?

    You have no debugging so how do you know which path the If statement did.
    Code:
    If rs.EOF Then
        'No Record in the DB
      Else
        'Record in the DB
      End If
    Code:
    on error resume next
    If rs.eof and rs.bof then
      response.write "No records returned"
    else
      response.write "Records found"
        while not rs.eof
           response.write rs(0) & "<br>"
           rs.movenext
        end while
    end if
    
    
    if err.number<>0 then
      response.write err.description
      response.end
    end if
    Truly, you have a dizzying intellect.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2002
    Location
    Canton, GA
    Posts
    487

    Re: classic asp help please

    Thanks for the help! I jumped over asp and went straight to asp.net - Its not as hard as I thought it would be just a bit of a learning curve... Im only learning it because a client has a site in asp and doesnt want to upgrade to asp.net.

    Thanks!

    Anjari

Posting Permissions

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



Click Here to Expand Forum to Full Width