Forum Moderators: open
<%
If Not (DinningOutCuisine Is Nothing) Then
' Object okay, do your stuff here
If Not (DinningOutCuisine.EOF And DinningOutCuisine.BOF) Then %>
<!-- Process DinningOutCuisine recordset -->
<% Else %>
<!-- Object not set, do error handling -->
<% End If %>
Sometimes the object is set and sometimes not
If you are going to call that recordset anywhere on the page, you have to set it first - I don't think there is another way.
You have to have something like this:
Set DiningoutCuisine = Server.CreateObject("ADODB.Recordset")
before you can "use" DiningoutCuisine
Sometimes the object is set and sometimes not.
Also, you can initialize the recordset object to Nothing and that will avoid this particular issue.
Dim DiningOutCuisine
Set DiningOutCuisine = Nothing