mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 ADODB.Recordset error '800a0cc1'

Author Message
zaxwang

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 6/9/2009
  • Status: offline
ADODB.Recordset error '800a0cc1' Tuesday, June 09, 2009 9:10 PM (permalink)
0
Can anyone help me out here..
I trying to resolve this error here
 

ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/Apps/Reservation/asp/Reserve.asp, line 86
 
 
Here is the vb code
 
<%
 response.write "<body ><div class='heading1'> Processing Request ... pls wait ... </div>"
 Dim intStaffId
 Dim rst2
 Dim from_date
 Dim to_date
 'Dim objRS
 'Dim strsql
 Dim i,j
 Dim target
 Dim SQLQuery2
 Dim stime, etime, flag, ustime, uetime
 Dim inv_no
 Dim intRefId
 Dim arr(10,10)
 Dim strArr
 Dim blnAvailable
 flag = 0
 blnAvailable = false
 intStaffId = Request.form("cboUser")
 ustime = Request("starttime")   'User Start Time
 uetime = Request("endtime")  'User End Time
 if session("type")="1" then
  intRefId=Request.form("notebook")
 elseif session("type")="2" then
  intRefId=Request.form("room")
 elseif session("type")="3" then
  intRefId=Request.form("projector")
 end if
 Set rst2 = Server.CreateObject("ADODB.Recordset")
 from_Date=request("txt_FromDate")
 from_Date=from_date
 
 to_Date=request("txt_ToDate")
 to_date=to_date
 
 
 'Response.End
 'if WeekDay(from_date) = "1" or WeekDay(from_date) = "7" then
 ' DisplayMessage "Sorry! Bookings cannot start on a Saturday or a Sunday. Please choose a different date.","javascript:history.back();"
 ' response.end
 'end if
 'if WeekDay(to_date) = "1" or WeekDay(to_date) = "7" then
 ' DisplayMessage "Sorry! Bookings cannot end on a Saturday or a Sunday. Please choose a different date.","javascript:history.back();"
 ' response.end
 'end if
 if session("type")=1 then
  strSQL="Select inv_no from tbl_notebookdetails where status=1 and inv_no = " & intRefId
 elseif session("type")=2 then
  strSQL="Select reference_id inv_no from tbl_roomdetails where reference_id = " & intRefId
 elseif session("type")=3 then
  strSQL="Select reference_id inv_no from tbl_projectordetails where reference_id = " & intRefId & " and status=1 order by rank" 
 end if
 gf_openRecordset strsql, objrs, objConn
 
 j=0
 while not objRs.eof 
  if cdate(To_Date)=cdate(from_Date) then
'   Target=1     
   Target=0
  else
   Target=(cdate(To_Date) - cdate(from_Date))
   ustime = 0  'User Start Time
   uetime = 19  'User End Time
  end if
  Dim nextDate
  for i=0 to Target
   nextDate = CDate(from_date) + i
'   Response.Write nextDate
   SQLQuery2 = "SELECT * from Tbl_Notebook where Inv_no=" & objRs("Inv_no") & " and Start_Dt=convert(datetime,'" & Day(nextDate) & "/" & Month (nextDate) & "/" & Year(nextDate) & "',103) and End_Dt=convert(datetime,'" & Day(nextDate) & "/" & Month (nextDate) & "/" & Year(nextDate) & "',103) and Type=" & session("type") & " order by Start_Time"  <- this is the line for the error
'   response.write sqlQuery2 & "<br>"
   
   Set rst2 = objConn.Execute(SQLQuery2)  
   If not rst2.eof  then
    Do While Not rst2.EOF
     stime = rst2("start_time")
     etime = rst2("end_time")
     if CInt(ustime) = CInt(stime) then    
      flag = 1
     elseif CInt(ustime) >= CInt(stime) AND CInt(uetime) <= CInt(etime)  then
      flag = 1 
     elseif CInt(ustime) >= CInt(stime) AND CInt(ustime) < CInt(etime)  then
      flag = 1
     elseif CInt(ustime) =< CInt(stime)  AND CInt(uetime) > CInt(etime) then
      flag = 1
     elseif CInt(ustime) =< CInt(stime)  AND CInt(uetime) <= CInt(etime) AND CInt(uetime) > CInt(stime) then
      flag = 1
     End If  
     rst2.MoveNext
    Loop 
   end if          
  next
  if flag=1 then
   arr(j,0)=objRs("inv_no")
   arr(j,1)=1
  else
   arr(j,0)=objRs("inv_no")
   arr(j,1)=0
  end if
  flag=0     
  j=j+1  
  objRs.movenext()
 wend
 
 for i=0 to j-1   
  if arr(i,1)=0 then      
   strArr = arr(i,0)
   blnAvailable = true
   objRs.movelast()  
  end if
 next
 if not blnAvailable then
  Response.Redirect("unavailable.asp")
 end if
 
 
Thanks.
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com