asp help

  • Thread starter Thread starter matt shudy
  • Start date Start date
M

matt shudy

Hi,

I am trying to use a for...next loop, but am having some
problems. Is there anything wrong with what i wrote?
Right now i am just testing it with a variable, i will
later put in the real value i want.

Thanks,

Matt

For i = 1 to 12
objRS.Filter="Month = i"
Response.Write "<TR><TD>" & objRS("Location")
& "</TD></TR>"
next

This is the error i get...

ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable
range, or are in conflict with one another.

/enveng/bowlingcharts/test.asp, line 37
 
Looks to me like your Month field is not a text value. :) What you're
doing here is looking for a record where Month is equal to "i".

Try using this as your Filter property:

objRS.Filter = "Month = " & i

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
Thank you! :)
matt
-----Original Message-----
Looks to me like your Month field is not a text value. :) What you're
doing here is looking for a record where Month is equal to "i".

Try using this as your Filter property:

objRS.Filter = "Month = " & i

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003





.
 
Back
Top