[thelist] Sigh. More ASP. This time, trouble reading a file
Ken Schaefer
ken at adOpenStatic.com
Thu Aug 7 21:19:42 CDT 2003
www.adopenstatic.com/faq/recordcounterror.asp
www.adopenstatic.com/faq/recordcountalternatives.asp
What you really should be doing, instead of checking .RecordCount() is:
<%
If rsActivity.EOF then
Response.Write( _
"<h2><font align=center color=""#55eeee"">" & _
"Sorry no items were found</font></h2>")
Else
' There are records
End If
%>
Cheers
Ken
----- Original Message -----
From: "Lightening" <oktellme at earthlink.net>
To: "thelist" <thelist at lists.evolt.org>
Sent: Friday, August 08, 2003 12:00 PM
Subject: [thelist] Sigh. More ASP. This time, trouble reading a file
: Here is another piece of asp code that should work, but doesn't.
:
: Same calendar I asked about before. If the calendar says there is a party,
: the person can click on it and get more info about the party. So I am
: passing an ActivityId off a valid record.
:
:
: I am displaying the sql statement, so I know it is being formated
correctly
: and activityID = correct ID. But every time, it returns zero records
found-
: I get the "Sorry no items were found" routine.
:
: Can anyone see what O might be doing wrong?
:
: thanks
: Laura
:
:
___________________________________________________________________________
:
:
:
:
: set rsActivity=Server.CreateObject("ADODB.RecordSet")
: sql="SELECT activityId, event, eventType, " & _
: " MemberFee, NonMemberFee, Description, " & _
: " from activityTable "
:
: sql=sql & " where ActivityId= " & aActivityId & ";"
:
:
: Response.write sql & "<br>"
: rsActivity.Open sql,dsn
:
: if rsActivity.recordcount<=0 then
: response.write "<h2><font align=center color='#55eeee' >Sorry no items
: were found</font></h2>"
: rsActivity.close
: set rsActivity=nothing
: response.end
: end if
:
:
: response.write "<tr><th>Activity Id</th>"
: response.write "<td>" & rsActivity.Fields("ActivityId").value & "</td>"
: response.write "</tr>"
More information about the thelist
mailing list