473,401 Members | 2,139 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,401 software developers and data experts.

Error Type: ADODB.Recordset (0x800A0E7D)

Hi Friends!

Please Help me! How i can solve this error? Please explain me, what is the error and how to solve?

Expand|Select|Wrap|Line Numbers
  1. Error Type:
  2. ADODB.Recordset (0x800A0E7D)
  3. The connection cannot be used to perform this operation. It is either closed or invalid in this context.
  4. /H3finalresult/include/accept_reject2.asp, line 18
  5.  
connection.asp

Expand|Select|Wrap|Line Numbers
  1. <%    
  2.     const TBL_Data = "tbl_data"
  3.     const TBL_H3Appr = "tbl_H3Approved"
  4.     const TBL_H3Selec = "tbl_H3Selected"
  5.     const TFL_H3SelecID = "IDNO"
  6.     const TFL_H3IDNO = "IDNO"
  7.     const TFL_IDNO = "IDNO"
  8.     const TFL_DOB = "DOB"
  9.  
  10.     const DB_NAME = "DataBase/H3OnlineApp.mdb"
  11.     mdb_path = pathdefiner & DB_NAME
  12.     set my_Conn = Server.CreateObject("ADODB.Connection")
  13.     my_Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(mdb_path)
  14. %>
  15.  
accept_reject2.asp

Expand|Select|Wrap|Line Numbers
  1. <%pathdefiner="../"%>
  2. <!-- #include file="../Connection/connector.asp" -->
  3. <!--#include file="declareVariables.asp" -->
  4. <!--#include file="RetrieveSubj2.asp" -->
  5. <!--#include file="../MainMenu/Header.htm" -->
  6.  
  7. <%
  8. dim rsSql,rsctSql
  9. dim a
  10. dim ctstatus
  11.  
  12.     Set rs = Server.CreateObject("ADODB.Recordset")
  13.     Set rs.ActiveConnection = my_Conn
  14.  
  15. rsSql= "SELECT * FROM " & TBL_H3Appr &" where "& TFL_H3IDNO & "='" & Session.Contents("IDNO") & "';"
  16.  
  17. rs.Source = rsSql
  18. rs.Open ------ line 18
  19.  
  20. WHILE NOT rs.EOF
  21.  
  22. %>
  23.  
  24. <form id="frmUpdate" name="frmUpdate" method="post" action="Updatesubj2.asp">
  25.   <p align="center">&nbsp;</p>
  26.   <div align="center">
  27.     <table width="522" border="0" cellspacing="0" cellpadding="0">
  28.      <tr>
  29.         <td><p>You are allowed to offer
  30.             <input name="txt_Num_H3_Approved" type="text" id="txt_Num_H3_Approved" value="<% = rs("Num_H3_Approved")%>" size="3" readonly>
  31. H3 Subject(s)</p>
  32.         <p>&nbsp;</p></td>
  33.       </tr>
  34.       <tr>
  35.         <td>
  36.         <%uni1 = RetrieveApp(0)%>
  37.         <%if(StrComp(uni1,"off1")=0)then%><label>
  38.         <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>
  39. I will offer the following TWO subjects.</label>
  40.         <%else%>
  41.           <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" > 
  42.           I will offer the following TWO subjects.</label>
  43.           <%End if%></td>
  44.       </tr>
  45.       <tr>
  46.         <td>
  47.         <%uni2 = RetrieveApp(1)%>
  48.         <%if(StrComp(uni2,"off1")=0)then%><label>
  49.           <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> 
  50.           I will offer the following ONE subject.</label>
  51.           <%else%>
  52.           <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" > 
  53.           I will offer the following ONE subject.</label>
  54.           <%End if%>          </td>
  55.       </tr>
  56.       <tr>
  57.         <td><label>
  58.         <%uni3 = RetrieveApp(2)%>
  59.         <%if(StrComp(uni3,"off1")=0)then%>
  60.           <input type="checkbox" name="chk_Decided_Not" id="chk0" onClick="javascript:Ondecidchecked(),disablechk0();" value="Decided not to offer any H3" checked >
  61.         I have decided NOT to offer any H3 subject(s).<br>
  62.         </label>
  63.         <%else%>
  64.           <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>
  65.           <%End if%></td>
  66.       </tr>
  67.       <tr>
  68.         <td>
  69.         <span id="SPAN_decidsubj"></span>
  70.         <span id="SPAN_Onchecksubj">
  71.         <table width="404" border="0" cellspacing="0" cellpadding="0">
  72.      <%
  73.      if rs("MOE_Approved1") =  "NIL" then
  74.         else
  75.         %>
  76.       <tr>
  77.         <td><strong>I will offer the following subject(s):</strong></td>
  78.       </tr>
  79.       <tr>
  80.         <td width="399"><label>
  81.         <%uni4 = RetrieveApp(3)%>
  82.         <%if(StrComp(uni4,"Moe1")=0)then%>
  83.           <label> <input type="checkbox" name="chk_MOE_Approved1" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved1")%>" checked > MOE &nbsp; &nbsp; <% = rs("MOE_Approved1")%> </label>
  84.           <%else%>
  85.           <label> <input type="checkbox" name="chk_MOE_Approved1" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved1")%>" > MOE &nbsp; &nbsp; <% = rs("MOE_Approved1")%> </label>
  86.           <%End if%>
  87.         </label></td>
  88.       </tr>
  89.       <% end if 
  90.        if rs("MOE_Approved2") =  "NIL" then
  91.         else
  92.        %>
  93.       <tr><td width="399"><label>
  94.       <%uni5 = RetrieveApp(4)%>
  95.       <%if(StrComp(uni5,"Moe2")=0)then%>
  96.       <label> <input type="checkbox" name="chk_MOE_Approved2" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved2")%>" checked >  MOE &nbsp; &nbsp; <% = rs("MOE_Approved2")%> </label>
  97.       <%else%>
  98.       <label> <input type="checkbox" name="chk_MOE_Approved2" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved2")%>"   >  MOE &nbsp; &nbsp; <% = rs("MOE_Approved2")%> </label>
  99.       <%End if%>
  100.         </label></td>
  101.       </tr>
  102.       <% end if 
  103.        if rs("MOE_Approved3") =  "NIL" then
  104.         else
  105.        %>
  106.       <tr><td width="399"><label>
  107.       <%uni6 = RetrieveApp(5)%>
  108.       <%if(StrComp(uni6,"Moe3")=0)then%>
  109.         <label> <input type="checkbox" name="chk_MOE_Approved3" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved3")%>" checked > MOE &nbsp; &nbsp; <% = rs("MOE_Approved3")%> </label>
  110.         <%else%>
  111.          <label> <input type="checkbox" name="chk_MOE_Approved3" id="chk" onClick="return myFunction()" value="<% = rs("MOE_Approved3")%>"  > MOE &nbsp; &nbsp; <% = rs("MOE_Approved3")%> </label>
  112.         <%End if%>
  113.         </label></td>
  114.       </tr>
  115.       <% 
  116.     end if  // moe end if
  117.     //-------------- Nus ---------------------//
  118.            if rs("NUS_Approved") =  "NIL" then
  119.         else    
  120.         %>
  121.       <tr>
  122.         <td width="399"><label>
  123.         <%uni7 = RetrieveApp(6)%>
  124.         <%if(StrComp(uni7,"Nus")=0)then%>
  125.         <label> <input type="checkbox" name="chk_NUS_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NUS_Approved")%>" checked > NUS &nbsp; &nbsp; &nbsp;<% = rs("NUS_Approved")%> </label>
  126.         <%else%>
  127.          <label> <input type="checkbox" name="chk_NUS_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NUS_Approved")%>" > NUS &nbsp; &nbsp; &nbsp;<% = rs("NUS_Approved")%> </label>
  128.         <%End if%>
  129.         </label></td>
  130.       </tr>
  131.     <% 
  132.     end if  // Nus end if
  133.  
  134.     //-------------- Ntu ---------------------//
  135.            if rs("NTU_Approved") =  "NIL" then
  136.         else    
  137.         %>
  138.       <tr>
  139.         <td width="399"><label>
  140.         <%uni8 = RetrieveApp(7)%>
  141.          <%if(StrComp(uni8,"Ntu")=0)then%>
  142.         <label> <input type="checkbox" name="chk_NTU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NTU_Approved")%>" checked > NTU &nbsp; &nbsp; &nbsp;<% = rs("NTU_Approved")%> </label>
  143.         <%else%>
  144.          <label> <input type="checkbox" name="chk_NTU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("NTU_Approved")%>"  > NTU &nbsp; &nbsp; &nbsp;<% = rs("NTU_Approved")%> </label>
  145.         <%End if%>
  146.         </label></td>
  147.       </tr>
  148.       <% 
  149.     end if  // ntu end if
  150.     //-------------- Smu ---------------------//
  151.            if rs("SMU_Approved") =  "NIL" then
  152.         else    
  153.         %>
  154.       <tr>
  155.         <td width="399"><label>
  156.         <%uni9 = RetrieveApp(8)%>
  157.         <%if(StrComp(uni9,"Smu")=0)then%>
  158.         <label> <input type="checkbox" name="chk_SMU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("SMU_Approved")%>" checked  > SMU &nbsp; &nbsp; &nbsp;<% = rs("SMU_Approved")%> </label>
  159.         <%else%>
  160.          <label> <input type="checkbox" name="chk_SMU_Approved" id="chk" onClick="return myFunction()" value="<% = rs("SMU_Approved")%>"  > SMU &nbsp; &nbsp; <% = rs("SMU_Approved")%> </label>
  161.         <%End if%>
  162.         </label></td>
  163.       </tr>
  164.  
  165.       <% 
  166.     end if
  167.  
  168.  rs.MoveNext
  169.  WEND
  170.     rs.Close
  171.     my_Conn.Close
  172.     set rs=nothing
  173.     set my_Conn=nothing
  174.     Response.Expires = -1 
  175.  
  176. %>
  177. <span id="SPAN_selectSubj"></span>
  178.     </table></span>
  179.         </td>
  180.       </tr>
  181.     </table>
  182.  
  183.   </div>
  184.   <p align="center">
  185.     <input type="submit" name="Submit" id="submit" value="submit" onClick="">
  186.   </p>
  187.   </label>
  188. </form>
  189. <!--#include file="../MainMenu/Footer.htm" -->
  190. <script>
  191.     setupScript();
  192. </script>
  193.  
Thanks and Regards,
Susan
Nov 6 '08 #1
1 3338
DrBunchman
979 Expert 512MB
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
Nov 6 '08 #2

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

Similar topics

2
by: Tom Petersen | last post by:
I have been copying and pasting code and this has been working, but now I get this error: Error Type: ADODB.Recordset (0x800A0E7D) Operation is not allowed on an object referencing a closed or...
8
by: middletree | last post by:
I had some text links at the top of all my pages (in one include file), which worked just fine. But I was asked to make it so that people in a certain department, (this is an Intranet app) would...
1
by: Jack | last post by:
Hi, I am trying to add a new record to a main page. This page is the processing page to a form. However, I am getting the following error message: Error Type: ADODB.Recordset (0x800A0BB9)...
3
by: amitbadgi | last post by:
Hi I am converting an asp applicattion to asp.net, and I am getting an error as follows, Exception Details: System.Runtime.InteropServices.COMException: Type mismatch. Source Error: Line...
0
by: umshamma | last post by:
I am creating an asp programm for our employee leaves tracking... i am getting this error ADODB.Recordset (0x800A0E7D) The connection cannot be used to perform this operation. It is either closed or...
1
by: Kosmös Pollard | last post by:
Hey guys, I'm rather new to access and can not seem to figure out what is wrong with this code I will post below...but first...it was working perfectly fine before I added this: recSet2.Edit...
2
by: Favaravid | last post by:
Does any soul out there have any idea why am i getting this error: .................................................................................................. Error Type: Microsoft JET...
1
by: mudasserrafiq | last post by:
I am using following asp file default.asp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="0...
2
by: colesslow | last post by:
i have these asp files to edit a record in my sql server..but it can't be done. the error is Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to perform this operation. It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.