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
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
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="style.css"-->
<!--#include file="first.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>VLAN View/Deletion</title>
<script type="text/javascript">
function menu(){
window.location="menu.asp"
}
</script>
</head>
<body>
<form name="myform" method="post" action="vlan_master_del.asp">
<div id="myDiv" style="position:absolute; top:150px; left:200px; width:600px; height:500px">
<%
set conn = server.createobject("ADODB.Connection")
set rs = server.createobject("ADODB.Recordset")
conn.open "Provider=MSDAORA.1; dsn=ipis; Password=ipis; User Id=ipis; Data Source=isap2000; Persist Security Info=True"
%>
<h2><center>VLAN Master View/Deletion</center></h2>
<table align="center">
<tr>
<td>Select a VLAN : </td>
<td>
<select name="vlan_name">
<% set rs = conn.execute("select vlan_name from vlan_master order by vlan_name")
do while not rs.eof %>
<% if not isempty(request.form("submit")) and request.form("vlan_name")=rs("vlan_name") then %>
<option value="<%=rs("vlan_name")%>" selected><%=rs("vlan_name")%></option>
<% else %>
<option value="<%=rs("vlan_name")%>"><%=rs("vlan_name")%></option>
<% end if
rs.movenext
loop %>
</select>
</td>
<td><input type="submit" style="width:100px " name="submit" value="Generate"/></td>
</tr>
</table>
<% if not isempty(request.form("submit")) then
v_vlan_name = trim(request.form("vlan_name"))
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&"'")
%>
<table align="center" border="1">
<tr>
<td>
<table>
<tr>
<td align="right" style="width:125px ">VLAN Name :</td>
<td>
<input type="text" style="width:250px " name="vlan_name" value="<%=rs("vlan_name")%>"/>
</td>
</tr>
<tr>
<td align="right" style="width:125px ">VLAN First IP :</td>
<td align="left">
<input type="text" style="width:100px " name="first_ip" value="<%=rs("first_ip")%>"/>
</td>
</tr>
<tr>
<td align="right" style="width:125px ">VLAN Last IP :</td>
<td align="left">
<input type="text" style="width:100px " name="last_ip" value="<%=rs("last_ip")%>"/>
</td>
</tr>
<tr>
<td align="right" style="width:125px ">VLAN Subnet Mask :</td>
<td align="left">
<input type="text" style="width:100px " name="subnet_mask" value="<%=rs("subnet_mask")%>"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td align="right" style="width:125px ">Router :</td>
<td align="left"><input type="text" style="width:50px " name="router" value="<%=rs("router")%>"/></td>
<td align="right" style="width:125px ">Switch :</td>
<td align="left"><input type="text" style="width:50px " name="network_switch" value="<%=rs("network_switch")%>"/></td>
</tr>
<tr>
<td align="right" style="width:125px ">Camera :</td>
<td align="left"><input type="text" style="width:50px " name="camera" value="<%=rs("camera")%>"/></td>
<td align="right" style="width:125px ">Printer :</td>
<td align="left"><input type="text" style="width:50px " name="printer" value="<%=rs("printer")%>"/></td>
</tr>
<tr>
<td align="right" style="width:125px ">Server :</td>
<td align="left"><input type="text" style="width:50px " name="server" value="<%=rs("server")%>"/></td>
<td align="right" style="width:125px ">IP Phone :</td>
<td align="left"><input type="text" style="width:50px " name="ip_phone" value="<%=rs("ip_phone")%>"/></td>
</tr>
<tr>
<td align="right" style="width:125px ">PC :</td>
<td align="left"><input type="text" style="width:50px " name="pc" value="<%=rs("PC")%>"/></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table align="center">
<tr>
<td><input type="button" name="back" value="Back" style="width:100px" onclick="menu();"/></td>
<td><input type="button" name="delete1" value="Delete" style="width:100px"/></td>
</tr>
</table>
</td>
</tr>
</table>
<% end if %>
</div>
</form>
</body>
</html>
Comment