asp help

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
 
J

Jim Cheshire

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
 
M

matt shudy

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





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top