A
azza
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
/PROJECT/edit.asp, line 39
<%@ LANGUAGE="JAVASCRIPT" %>
<%
var refer = String(Request.ServerVariables("QUERY_STRING"));
var Item2 = refer.substring(3);
var MM_connInviTT_STRING;
MM_connInviTT_STRING = "Provider=Microsoft.JET.OLEDB.4.0;Data
Source=C:/Inetpub/wwwroot/PROJECT/Record.mdb"
var Conn = Server.CreateObject("ADODB.Connection");
Conn.Open(MM_connInviTT_STRING);
var sql="SELECT * FROM aktiviti WHERE activity = '" + Item2 + "'";
var rs=Server.CreateObject("ADODB.Recordset");
rs.Open(sql, Conn);
if (Request("btnEdit") == "Update")
{
var prog= Request.Form("prog");
var bulan=Request.Form("bulan");
sql_update="UPDATE aktiviti SET bulan='"+bulan+"', activity='"+ prog +"'
WHERE refer='"+Item2+"'";
Conn.Execute(sql_update);
rs.Close();
rs = null;
Conn.Close();
Conn = null;
Response.Redirect("editNdelete.asp");
}
%>
<html><head><title>Update Detail</title></head>
<body background="pics/red.bmp">
<br><br><br>
<FORM METHOD="POST" ACTION="editNdelete.asp">
<table border=12 align="center" cellpadding=20 bgcolor="#ffcccc">
<tr><td colspan=2><p><b><font
color="#0000FF"><h2><center>MAKLUMAT</center></h2></font></b></p>
</td></tr>
<tr><td>
<table align="center" cellspacing=15 bgcolor="#ffcccc">
<tr><td>KOD</td><td>: <% Response.Write(rs.fields.item("refer"))%>
</td></tr>
<tr><td>BULAN</td><td>: <input type="text" name="bulan" size="2"
VALUE="<% =rs.fields.item("bulan")%>"> </td></tr>
<tr><td>PROGRAM</td><td>: <input type="text" name="prog" size="20"
VALUE="<% =rs.fields.item("activity")%>">
</td></tr><tr><td colspan=2 align="center"><INPUT TYPE="Submit"
NAME="btnEdit" VALUE="Update"></td></tr>
</td></tr></table>
</td></tr></table>
</FORM>
</body>
</html>
operation requires a current record.
/PROJECT/edit.asp, line 39
<%@ LANGUAGE="JAVASCRIPT" %>
<%
var refer = String(Request.ServerVariables("QUERY_STRING"));
var Item2 = refer.substring(3);
var MM_connInviTT_STRING;
MM_connInviTT_STRING = "Provider=Microsoft.JET.OLEDB.4.0;Data
Source=C:/Inetpub/wwwroot/PROJECT/Record.mdb"
var Conn = Server.CreateObject("ADODB.Connection");
Conn.Open(MM_connInviTT_STRING);
var sql="SELECT * FROM aktiviti WHERE activity = '" + Item2 + "'";
var rs=Server.CreateObject("ADODB.Recordset");
rs.Open(sql, Conn);
if (Request("btnEdit") == "Update")
{
var prog= Request.Form("prog");
var bulan=Request.Form("bulan");
sql_update="UPDATE aktiviti SET bulan='"+bulan+"', activity='"+ prog +"'
WHERE refer='"+Item2+"'";
Conn.Execute(sql_update);
rs.Close();
rs = null;
Conn.Close();
Conn = null;
Response.Redirect("editNdelete.asp");
}
%>
<html><head><title>Update Detail</title></head>
<body background="pics/red.bmp">
<br><br><br>
<FORM METHOD="POST" ACTION="editNdelete.asp">
<table border=12 align="center" cellpadding=20 bgcolor="#ffcccc">
<tr><td colspan=2><p><b><font
color="#0000FF"><h2><center>MAKLUMAT</center></h2></font></b></p>
</td></tr>
<tr><td>
<table align="center" cellspacing=15 bgcolor="#ffcccc">
<tr><td>KOD</td><td>: <% Response.Write(rs.fields.item("refer"))%>
</td></tr>
<tr><td>BULAN</td><td>: <input type="text" name="bulan" size="2"
VALUE="<% =rs.fields.item("bulan")%>"> </td></tr>
<tr><td>PROGRAM</td><td>: <input type="text" name="prog" size="20"
VALUE="<% =rs.fields.item("activity")%>">
</td></tr><tr><td colspan=2 align="center"><INPUT TYPE="Submit"
NAME="btnEdit" VALUE="Update"></td></tr>
</td></tr></table>
</td></tr></table>
</FORM>
</body>
</html>