PDA

View Full Version : strange error..



wealoon
December 27th, 2002, 05:57 AM
i hav this poblem when i try to test the asp script out:

ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.



strday = Request("Day")
strmonth = Request("Month")
stryear = Request("Year")
struserID = Request("currentUserID")

'create the database connection
Set oConn = Server.CreateObject("ADODB.Connection")
'open the database
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/0calendar001/database.mdb")

'open the recordset
Set oRs = Server.CreateObject("ADODB.Recordset")

strSql = "Select CalendarID From Calendar Where UserID="& struserID & " and DateDay ="& strday & " and DateMonth ="& strmonth & " and DateYear ="& stryear & ""

oRs.Open strSql,oConn,1,3

If oRs.EOF Then

Response.write ("viewgo=false")
else
Response.write ("viewgo=true")
Response.write "ToDoList=" & Server.URLEncode(oRs("ToDoList")) & "&"
Response.write "calID=" & Server.URLEncode(oRs("CalendarID")) & "&"


end if

oRs.Close
oConn.Close



i searched on the web and found out that the error is about requesting a field from the recordset that does not exist.

but the field do exist inside my database.. which leave me completely puzzled.. any other reasons behind this? please i really need some help here..

wealoon
December 27th, 2002, 06:19 AM
it works now.. hmm.. dono why just now didnt work..