473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Either BOF or EOF is True, or the current record has been deleted.

vikas251074
198 100+
Hello sir,
I am facing some problem for which I am trying hard to solve it. But in vain.
This programe is for View/Deletion. When I run program for first time, I select vlan from list and press Enter key, it display the details. Now when I again select vlan from list and press Enter key, following error occurs.
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

I think error is in line no. 44. How to solve this problem?

Thanks and regards,
Vikas

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--#include file="style.css"-->
  3. <!--#include file="first.asp"-->
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. <title>VLAN View/Deletion</title>
  8. <script type="text/javascript">
  9. function menu(){
  10.   window.location="menu.asp"
  11. }
  12. </script>
  13. </head>
  14. <body>
  15. <form name="myform" method="post" action="vlan_master_del.asp">
  16. <div id="myDiv" style="position:absolute; top:150px; left:200px; width:600px; height:500px">
  17. <%
  18. set conn = server.createobject("ADODB.Connection")
  19. set rs = server.createobject("ADODB.Recordset")
  20. conn.open "Provider=MSDAORA.1; dsn=ipis; Password=ipis; User Id=ipis; Data Source=isap2000; Persist Security Info=True"
  21. %>
  22. <h2><center>VLAN Master View/Deletion</center></h2>
  23. <table align="center">
  24.   <tr>
  25.     <td>Select a VLAN : </td>
  26.     <td>
  27.       <select name="vlan_name">
  28. <%        set rs = conn.execute("select vlan_name from vlan_master order by vlan_name")
  29.         do while not rs.eof %>
  30. <%        if not isempty(request.form("submit")) and request.form("vlan_name")=rs("vlan_name") then %>
  31.             <option value="<%=rs("vlan_name")%>" selected><%=rs("vlan_name")%></option>
  32. <%        else %>
  33.             <option value="<%=rs("vlan_name")%>"><%=rs("vlan_name")%></option>
  34. <%        end if
  35.         rs.movenext
  36.         loop %>
  37.       </select>
  38.     </td>
  39.     <td><input type="submit" style="width:100px " name="submit" value="Generate"/></td>
  40.   </tr>
  41. </table>
  42. <% if not isempty(request.form("submit")) then 
  43.   v_vlan_name = trim(request.form("vlan_name"))
  44.   set rs = conn.execute("select vlan_name, first_ip, last_ip, subnet_mask, router, network_switch, camera, printer, server, ip_phone, pc from vlan_master where vlan_name = '"&v_vlan_name&"'")
  45. %>
  46.   <table align="center" border="1">
  47.     <tr>
  48.       <td>
  49.         <table>
  50.           <tr>
  51.             <td align="right" style="width:125px ">VLAN Name :</td>
  52.             <td>
  53.               <input type="text" style="width:250px " name="vlan_name" value="<%=rs("vlan_name")%>"/>
  54.             </td>
  55.           </tr>
  56.           <tr>
  57.             <td align="right" style="width:125px ">VLAN First IP :</td>
  58.             <td align="left">
  59.               <input type="text" style="width:100px " name="first_ip" value="<%=rs("first_ip")%>"/>
  60.             </td>
  61.           </tr>
  62.           <tr>
  63.             <td align="right" style="width:125px ">VLAN Last IP :</td>
  64.             <td align="left">
  65.               <input type="text" style="width:100px " name="last_ip" value="<%=rs("last_ip")%>"/>
  66.             </td>
  67.           </tr>
  68.           <tr>
  69.             <td align="right" style="width:125px ">VLAN Subnet Mask :</td>
  70.             <td align="left">
  71.               <input type="text" style="width:100px " name="subnet_mask" value="<%=rs("subnet_mask")%>"/>
  72.             </td>
  73.           </tr>
  74.         </table>
  75.       </td>
  76.     </tr>
  77.     <tr>
  78.       <td>
  79.         <table>
  80.           <tr>
  81.             <td align="right" style="width:125px ">Router :</td>
  82.             <td align="left"><input type="text" style="width:50px " name="router" value="<%=rs("router")%>"/></td>
  83.             <td align="right" style="width:125px ">Switch :</td>
  84.             <td align="left"><input type="text" style="width:50px " name="network_switch" value="<%=rs("network_switch")%>"/></td>
  85.           </tr>
  86.           <tr>
  87.             <td align="right" style="width:125px ">Camera :</td>
  88.             <td align="left"><input type="text" style="width:50px " name="camera" value="<%=rs("camera")%>"/></td>
  89.             <td align="right" style="width:125px ">Printer :</td>
  90.             <td align="left"><input type="text" style="width:50px " name="printer" value="<%=rs("printer")%>"/></td>
  91.           </tr>
  92.           <tr>
  93.             <td align="right" style="width:125px ">Server :</td>
  94.             <td align="left"><input type="text" style="width:50px " name="server" value="<%=rs("server")%>"/></td>
  95.             <td align="right" style="width:125px ">IP Phone :</td>
  96.             <td align="left"><input type="text" style="width:50px " name="ip_phone" value="<%=rs("ip_phone")%>"/></td>
  97.           </tr>
  98.           <tr>
  99.             <td align="right" style="width:125px ">PC :</td>
  100.             <td align="left"><input type="text" style="width:50px " name="pc" value="<%=rs("PC")%>"/></td>
  101.           </tr>
  102.         </table>
  103.       </td>
  104.     </tr>
  105.     <tr>
  106.       <td>
  107.         <table align="center">
  108.           <tr>
  109.             <td><input type="button" name="back" value="Back" style="width:100px" onclick="menu();"/></td>
  110.             <td><input type="button" name="delete1" value="Delete" style="width:100px"/></td>
  111.           </tr>
  112.         </table>
  113.       </td>
  114.     </tr>
  115.   </table>
  116. <% end if %>
  117. </div>
  118. </form>
  119. </body>
  120. </html>
Jun 17 '08 #1
1 3010
idsanjeev
241 100+
hello vikas
plz modify your code with this modified code from line 23 to 45
Expand|Select|Wrap|Line Numbers
  1. <table align="center">
  2.   <tr>
  3.     <td>Select a VLAN : </td>
  4.     <td>
  5.             <select Id="vlan_name" Name="vlan_name" onChange="this.form.submit();">
  6.  
  7.  
  8.         <option value="">[Select Vlane]</option>
  9.         <%set rs = conn.execute("select vlan_name from vlan_master order by vlan_name")%>
  10.  
  11.             <% while not rs.eof %>
  12.         <option value=<%=rs("vlan_name")%> ><%=rs("vlan_name")%></option>
  13.         </option>
  14.  
  15.             <%
  16.             rs.movenext
  17.             wend
  18.             rs.close
  19. %>
  20.       </select>
  21.     </td>
  22.     <td><input type="submit" style="width:100px " name="submit" value="Generate"/></td>
  23.   </tr>
  24. </table>
  25. <% v_vlan_name=Request.Form("vlan_name")
  26.  
  27.   set rs = conn.execute("select vlan_name, first_ip, last_ip, subnet_mask, router, network_switch, camera, printer, server, ip_phone, pc from vlan_master where vlan_name = '"&v_vlan_name&"'")
  28.   if Rs.eof=true then
  29.   response.Write "Nothing to Display"
  30.   else
  31. %>
let us know what happens
Regards
Jha
Jun 17 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Chumley the Walrus | last post by:
When i put an explicit value in the sql statement below as "displaygroup =1 ", i do see my records (or my response.write test after the recordset Open line) appear on my dynamic page. But when use...
17
by: Gabriel Mejía | last post by:
Services or applications using ActiveX Data Objects (ADO) 2.0 or greater may intermittently return empty recordsets on queries that should be returning valid results. At the time the problem...
3
by: Maria | last post by:
Is there another way to delete the current record in a subform from the main form, another subform or a sub-subform other than setting focus on a field in the subform and using run command...
3
by: hebandgene | last post by:
When I delete a record in a subform I get the warning that I'm about to delete a record, followed by an error "No current record." When I click OK obviously the record is deleted and it goes to...
7
by: ruvi | last post by:
I am getting runtime error 3021 - Either EOF or BOF is true or the current record has been deleted..... I have 2 combo boxes in a form- One for the client and the other for the project. When the...
3
by: Kosmos | last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked...
19
by: mask | last post by:
Hi all, I have a problem of urgent nature . I am using Oracle and VB6 for an application . i am using ADODB coding In oracle i have created a table and trying to connect thru vb form. the vb code...
1
by: THEAF | last post by:
i'm trying to create a reminder form, when i add a new reminder its ok but when i try to delete a reminder then i get No Current Record problem. Form Load Private Sub Form_Load() Dim s() As...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.