Error Type: ADODB.Recordset (0x800A0E7D) | Member | | Join Date: Oct 2008
Posts: 58
| |
Hi Friends!
Please Help me! How i can solve this error? Please explain me, what is the error and how to solve? -
Error Type:
-
ADODB.Recordset (0x800A0E7D)
-
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
-
/H3finalresult/include/accept_reject2.asp, line 18
-
connection.asp -
<%
-
const TBL_Data = "tbl_data"
-
const TBL_H3Appr = "tbl_H3Approved"
-
const TBL_H3Selec = "tbl_H3Selected"
-
const TFL_H3SelecID = "IDNO"
-
const TFL_H3IDNO = "IDNO"
-
const TFL_IDNO = "IDNO"
-
const TFL_DOB = "DOB"
-
-
const DB_NAME = "DataBase/H3OnlineApp.mdb"
-
mdb_path = pathdefiner & DB_NAME
-
set my_Conn = Server.CreateObject("ADODB.Connection")
-
my_Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(mdb_path)
-
%>
-
accept_reject2.asp -
<%pathdefiner="../"%>
-
<!-- #include file="../Connection/connector.asp" -->
-
<!--#include file="declareVariables.asp" -->
-
<!--#include file="RetrieveSubj2.asp" -->
-
<!--#include file="../MainMenu/Header.htm" -->
-
-
<%
-
dim rsSql,rsctSql
-
dim a
-
dim ctstatus
-
-
Set rs = Server.CreateObject("ADODB.Recordset")
-
Set rs.ActiveConnection = my_Conn
-
-
rsSql= "SELECT * FROM " & TBL_H3Appr &" where "& TFL_H3IDNO & "='" & Session.Contents("IDNO") & "';"
-
-
rs.Source = rsSql
-
rs.Open ------ line 18
-
-
WHILE NOT rs.EOF
-
-
%>
-
-
<form id="frmUpdate" name="frmUpdate" method="post" action="Updatesubj2.asp">
-
<p align="center"> </p>
-
<div align="center">
-
<table width="522" border="0" cellspacing="0" cellpadding="0">
-
<tr>
-
<td><p>You are allowed to offer
-
<input name="txt_Num_H3_Approved" type="text" id="txt_Num_H3_Approved" value="<% = rs("Num_H3_Approved")%>" size="3" readonly>
-
H3 Subject(s)</p>
-
<p> </p></td>
-
</tr>
-
<tr>
-
<td>
-
<%uni1 = RetrieveApp(0)%>
-
<%if(StrComp(uni1,"off1")=0)then%><label>
-
<input type="checkbox" name="chk_Offer_2H3_Subject" id="chk2" onClick="javascript:Onchecked('chk2','SPAN_Onchecksubj','Offer 2H3 subjects'),disablechk2();" value="Offer 2H3 subjects" checked>
-
I will offer the following TWO subjects.</label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_Offer_2H3_Subject" id="chk2" onClick="javascript:Onchecked('chk2','SPAN_Onchecksubj','Offer 2H3 subjects'),disablechk2();" value="Offer 2H3 subjects" >
-
I will offer the following TWO subjects.</label>
-
<%End if%></td>
-
</tr>
-
<tr>
-
<td>
-
<%uni2 = RetrieveApp(1)%>
-
<%if(StrComp(uni2,"off1")=0)then%><label>
-
<input type="checkbox" name="chk_Offer_1H3_Subject" id="chk1" onClick="javascript:Onchecked('chk1','SPAN_Onchecksubj','Offer 1H3 subject'),disablechk1();" value="Offer 1H3 subject" checked>
-
I will offer the following ONE subject.</label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_Offer_1H3_Subject" id="chk1" onClick="javascript:Onchecked('chk1','SPAN_Onchecksubj','Offer 1H3 subject'),disablechk1();" value="Offer 1H3 subject" >
-
I will offer the following ONE subject.</label>
-
<%End if%> </td>
-
</tr>
-
<tr>
-
<td><label>
-
<%uni3 = RetrieveApp(2)%>
-
<%if(StrComp(uni3,"off1")=0)then%>
-
<input type="checkbox" name="chk_Decided_Not" id="chk0" onClick="javascript:Ondecidchecked(),disablechk0();" value="Decided not to offer any H3" checked >
-
I have decided NOT to offer any H3 subject(s).<br>
-
</label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_Decided_Not" id="chk0" onClick="javascript:Ondecidchecked(),disablechk0();" value="Decided not to offer any H3" > I have decided NOT to offer any H3 subject(s).</label>
-
<%End if%></td>
-
</tr>
-
<tr>
-
<td>
-
<span id="SPAN_decidsubj"></span>
-
<span id="SPAN_Onchecksubj">
-
<table width="404" border="0" cellspacing="0" cellpadding="0">
-
<%
-
if rs("MOE_Approved1") = "NIL" then
-
else
-
%>
-
<tr>
-
<td><strong>I will offer the following subject(s):</strong></td>
-
</tr>
-
<tr>
-
<td width="399"><label>
-
<%uni4 = RetrieveApp(3)%>
-
<%if(StrComp(uni4,"Moe1")=0)then%>
-
<label> <input type="checkbox" name="chk_MOE_Approved1" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved1")%>" checked > MOE <% = rs("MOE_Approved1")%> </label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_MOE_Approved1" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved1")%>" > MOE <% = rs("MOE_Approved1")%> </label>
-
<%End if%>
-
</label></td>
-
</tr>
-
<% end if
-
if rs("MOE_Approved2") = "NIL" then
-
else
-
%>
-
<tr><td width="399"><label>
-
<%uni5 = RetrieveApp(4)%>
-
<%if(StrComp(uni5,"Moe2")=0)then%>
-
<label> <input type="checkbox" name="chk_MOE_Approved2" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved2")%>" checked > MOE <% = rs("MOE_Approved2")%> </label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_MOE_Approved2" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved2")%>" > MOE <% = rs("MOE_Approved2")%> </label>
-
<%End if%>
-
</label></td>
-
</tr>
-
<% end if
-
if rs("MOE_Approved3") = "NIL" then
-
else
-
%>
-
<tr><td width="399"><label>
-
<%uni6 = RetrieveApp(5)%>
-
<%if(StrComp(uni6,"Moe3")=0)then%>
-
<label> <input type="checkbox" name="chk_MOE_Approved3" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved3")%>" checked > MOE <% = rs("MOE_Approved3")%> </label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_MOE_Approved3" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved3")%>" > MOE <% = rs("MOE_Approved3")%> </label>
-
<%End if%>
-
</label></td>
-
</tr>
-
<%
-
end if // moe end if
-
//-------------- Nus ---------------------//
-
if rs("NUS_Approved") = "NIL" then
-
else
-
%>
-
<tr>
-
<td width="399"><label>
-
<%uni7 = RetrieveApp(6)%>
-
<%if(StrComp(uni7,"Nus")=0)then%>
-
<label> <input type="checkbox" name="chk_NUS_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NUS_Approved")%>" checked > NUS <% = rs("NUS_Approved")%> </label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_NUS_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NUS_Approved")%>" > NUS <% = rs("NUS_Approved")%> </label>
-
<%End if%>
-
</label></td>
-
</tr>
-
<%
-
end if // Nus end if
-
-
//-------------- Ntu ---------------------//
-
if rs("NTU_Approved") = "NIL" then
-
else
-
%>
-
<tr>
-
<td width="399"><label>
-
<%uni8 = RetrieveApp(7)%>
-
<%if(StrComp(uni8,"Ntu")=0)then%>
-
<label> <input type="checkbox" name="chk_NTU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NTU_Approved")%>" checked > NTU <% = rs("NTU_Approved")%> </label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_NTU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NTU_Approved")%>" > NTU <% = rs("NTU_Approved")%> </label>
-
<%End if%>
-
</label></td>
-
</tr>
-
<%
-
end if // ntu end if
-
//-------------- Smu ---------------------//
-
if rs("SMU_Approved") = "NIL" then
-
else
-
%>
-
<tr>
-
<td width="399"><label>
-
<%uni9 = RetrieveApp(8)%>
-
<%if(StrComp(uni9,"Smu")=0)then%>
-
<label> <input type="checkbox" name="chk_SMU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("SMU_Approved")%>" checked > SMU <% = rs("SMU_Approved")%> </label>
-
<%else%>
-
<label> <input type="checkbox" name="chk_SMU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("SMU_Approved")%>" > SMU <% = rs("SMU_Approved")%> </label>
-
<%End if%>
-
</label></td>
-
</tr>
-
-
<%
-
end if
-
-
rs.MoveNext
-
WEND
-
rs.Close
-
my_Conn.Close
-
set rs=nothing
-
set my_Conn=nothing
-
Response.Expires = -1
-
-
%>
-
<span id="SPAN_selectSubj"></span>
-
</table></span>
-
</td>
-
</tr>
-
</table>
-
-
</div>
-
<p align="center">
-
<input type="submit" name="Submit" id="submit" value="submit" onClick="">
-
</p>
-
</label>
-
</form>
-
<!--#include file="../MainMenu/Footer.htm" -->
-
<script>
-
setupScript();
-
</script>
-
Thanks and Regards,
Susan
|  | Moderator | | Join Date: Jan 2008 Location: Winchester, UK
Posts: 930
| | | re: Error Type: ADODB.Recordset (0x800A0E7D)
Hi Susan,
What happens if you take the contents of your include file Connector.asp and paste it directly into your code (not forgetting to remove the include statement) - does it work then?
Dr B
|  | Similar ASP / Active Server Pages bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,501 network members.
|