-
Apr 27th, 2008, 02:20 PM
#1
Thread Starter
Hyperactive Member
[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!!
-
Apr 28th, 2008, 10:28 AM
#2
Hyperactive Member
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.
-
Apr 28th, 2008, 12:20 PM
#3
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|