Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - error in my code (Newbie)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

error in my code (Newbie)

 Post Reply Post Reply
Author
Yama View Drop Down
Newbie
Newbie


Joined: 18 December 2002
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Yama Quote  Post ReplyReply Direct Link To This Post Topic: error in my code (Newbie)
    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
        %>
       

 

Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.