Item cannot be found in the collection corresponding to the reques
am 17.03.2005 23:29:04 von jackHi, I am trying to run a sample code to see how it works. However, I am
getting the following error message:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name
or ordinal.
/gwis/FSR_EditDetail_test2.asp, line 346
THE CODE:
if mypage="Exp" then
sql01 = "SELECT ExpenditureTbl.* FROM ExpenditureTbl "
sql01 = sql01 & "WHERE ExpenditureTbl.GrantID = " & GrantID
end if
if mypage = "Inc" then
sql01 = "SELECT IncomeTbl.* FROM IncomeTbl "
sql01 = sql01 & "WHERE IncomeTbl.GrantID = " & GrantID
end if
if mypage = "Forf" then
sql01 = "SELECT ForfeitureTbl.* FROM ForfeitureTbl "
sql01 = sql01 & "WHERE ForfeitureTbl.GrantID = " & GrantID
end if
'write out the detail information from the database for Exp, Inc or Forf.
'response.write "Sue SQL:" & sql01
rstemp1.Open sql01
'set rstemp=conntemp.execute(sql01)
Do until rstemp1.eof
i = i + 1
response.write "
if MyPage="Exp" then
strLink = "
end if
if MyPage="Inc" then
strLink = "
end if
if MyPage="Forf" then
strLink = "
end if
response.write strLink & vbCRLF
if session("locked")<>"Y" then
if MyPage="Exp" Then
strLink = "
"&PageType="&mypage&"&Max="&max&"'>Delete
end if
if MyPage="Inc" then
strLink = "
"&PageType="&mypage&"&Max="&max&"'>Delete
end if
if MyPage="Forf" then
strLink = "
"&PageType="&mypage&"&Max="&max&"'>Delete
end if
response.write strLink & vbCRLF
else
strLink = "
response.write strLink & vbCRLF
end if
If rstemp1("ClaimNo") = "" then
strLink = "
"'>
else
strLink = "
end if
response.write strLink & vbCRLF
strLink = "
"'>/
'continue to write out the detail line
response.write strLink & vbCRLF
strLink = "
response.write strLink & vbCRLF
strLink = "
formatcurrency(rstemp("Amount")) & "
response.write strLink & vbCRLF
strLink = "
style='text-align: right;'>
response.write strLink & vbCRLF
strLink = "
style='text-align: right;'>
response.write strLink & vbCRLF
strLink = "
right;'>
response.write strLink & vbCRLF
strLink = "
style='text-align: right;'>
response.write strLink & vbCRLF
strLink = "
right;'>
response.write strLink & vbCRLF
response.write "
rstemp1.movenext
loop
rstemp1.Close
%>
The error is in the following line:
strLink = "
I could not figure out why the error is happening. Any help is appreciated
in advance.