The operation requested by the application is not

Results 1 to 3 of 3

Thread: The operation requested by the application is not

  1. #1
    Gilles Guest

    Default The operation requested by the application is not

    I have tried what Bill told me to do, that is replace<BR>rs.recordcount=0 to rs.eof <BR>but i get the same error<BR><BR>ADODB.Recordset error &#039 800a0e78&#039 <BR><BR>The operation requested by the application is not allowed if the object is closed. <BR><BR>/bkup ts1/Query/queryprojectsts.asp, line 118 <BR><BR>by the way the error message is at this line <BR><BR> if rs.recordcount=0 then line 118<BR><BR>But the funny part is that my database gets updated but i still get this error message. Thanks for helping<BR><BR>Here&#039s the script again<BR><BR>&#060;%<BR> dim ename,pcode,strdat,enddt <BR><BR> set db=Server.CreateObject("adodb.connection") <BR> "dsn=Timesheet" <BR><BR> pcode=request("Project") <BR> ename=request.form("ename")<BR> Selection=request("Answer")<BR> Testing=request("Test") <BR><BR> sql = "SELECT T.Taskid,P.Project,,T.Tasks,T.Taskdate,"<BR> sql = sql & " T.hours,C.Catdesc,T.Scheduled,T.Remarks,"<BR> sql = sql & " T.Status FROM Project P,Tasks T,Employee E,"<BR> sql = sql & " Category C WHERE E.Empid = T.Empid and P.Projectid = "<BR> sql = sql & " T.Projectid and C.Catid = T.Catid"<BR><BR> If pcode = "" then<BR> sql= sql & " and T.Projectid=0 "<BR> End if <BR><BR> If Selection = "2" then<BR> If pcode &#060;&#062; "" then<BR> sql= sql & " and T.projectid = " &pcode<BR> sql= sql & " Order By T.Taskdate, T.Taskid" <BR> Else<BR> sql= sql & " and T.projectid=0 " <BR> End if<BR> Else if Selection = "1" then<BR> sql = sql & " and T.Projectid=0 "<BR> sql = " UPDATE Project " & _<BR> " SET Projstatus = " & Checkstring(Testing, " ") & _ <BR> " WHERE Projectid = " &pcode & ";"<BR> End if<BR> End if<BR><BR>&#039response.write sql<BR> <BR> set rs=db.execute(sql) <BR> &#039if rs.recordcount=0 then<BR> if rs.EOF then <BR> response.write "No records found" <BR> end if <BR>%&#062; <BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: The operation requested by the application is

    You are not opening a recordset you are just executing a Sql Statement<BR><BR>set rs=db.execute(sql) <BR>in order for rs.recordCount to work you need to open the recordset<BR>Set rs=Server.CreateObject("ADODB.Recordset")<BR>RS.Op en sql, db, 3, 3<BR>if rs.recordcount=0 then<BR>response.write "No records found" <BR>end if <BR><BR>

  3. #3
    Gilles Guest

    Default doesn't work

    Actually, i have tried it but does not work<BR><BR>by the way, what does the 3, 3 means in the following line<BR><BR>RS.Open sql, db, 3, 3<BR><BR>what i did was that i added<BR><BR>set rs=Server.CreateObject("adodb.connection") <BR>rs.Open "dsn=Timesheet"<BR><BR>actually after the whole script(see request above), there is something else i forgot to add<BR><BR>&#060;%do while not rs.eof%&#062; <BR><BR>&#060;%rs.movenext <BR>loop%&#062; <BR><BR>thanks for trying<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts