Print Page | Close Window

error in my code (Newbie)

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1257
Printed Date: 28 March 2026 at 11:06pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: error in my code (Newbie)
Posted By: Yama
Subject: error in my code (Newbie)
Date Posted: 22 March 2003 at 11:55pm

I am new asp so please bare with me. I have the following code which gets a value from a drop down menu and queries the database and displays all the fields which are associated with that received value.

the database has only one table.

The error I am getting is that "object dosn't support this property or method : EOF"

<%
 
              strDataSource="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\NKCWeb\fpdb\alarm_management.mdb; Persist Security Info=False"
 
              set conn1 = server.createobject ("adodb.connection")
 
              conn1.open strDataSource

                            If Request.Form("alarm")<>"" Then
 
                                      Alarmselection=Request.form("alarm")
                                      Set RSalarmData=Server.CreateObject("ADODB.Recordset")
                                      RSalarmData= conn1.execute("SELECT * FROM Reef_alarm_list WHERE Alarm = 'alarm' ")
 
                                           If NOT RSalarmdata.EOF OR NOT RSalarmdata.BOF Then
  %>
 

  <table BORDER="0">
    <tr>
      <td><b>Alarm:</b></td>
      <td><textarea NAME="Alarm" ROWS="1" COLS="70"><%=RSAlarmData("Alarm")%></textarea></td>
    </tr>
    <tr>
      <td><b>Description:</b></td>
      <td><textarea NAME="Description" ROWS="5" COLS="70"><%RSalarmdata("description")%></textarea></td>
    </tr>
    <tr>
      <td><b>Action:</b></td>
      <td><textarea NAME="Action" ROWS="5" COLS="70"><%RSalarmdata("action")%></textarea></td>
    </tr>
    <tr>
      <td><b>category:</b></td>
      <td><textarea NAME="Category" ROWS="1" COLS="20"><%RSalarmdata("Category")%></textarea></td>
    </tr>
    <tr>
      <td><b>priority:</b></td>
      <td><textarea NAME="Priority" ROWS="1" COLS="20"><%RSalarmdata("Severity")%></textarea></td>
    </tr>
    <tr>
      <td COLSPAN="2"></td>
    </tr>
  </table>
 
 <hr>
 <br>
   <font size="3" color="cyan">Page: reef_alarm_managemnt.asp</font>
  
 <%                                                                    ELSE
 
                                                                       response.write("No Data was found")
                                          End If
                              End If
        conn1.close
        set conn1= nothing
        %>
       

 




Replies:
Posted By: Flamewave
Date Posted: 24 March 2003 at 1:32am

Try changing

If NOT RSalarmdata.EOF OR NOT RSalarmdata.BOF Then

to

If NOT RSalarmdata.EOF Then

as it seems that it is having troubles with the cursor type. If that doesn't work, try setting the cursor type to 1. Before the recordset is opened add:

RSalarmdata.CursorType = 1



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net