When the recordset is returned, the pointer refers to before the first row.
So, to make it point to the 1st row, u have to call rs.next();
To process any records, simply use
if (rs.next()) {
// put your code here
}
This should take care of it.
----- Original Message -----
From: "Christian Gayton" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 6:41 PM
Subject: Newbie : something like record.count ?
> Hi all,
>
> Just starting with jrun and jrun studio.
> I can connect to my SQL db with jrun tag, and with foreach, i can also
view
> recordset, cool :)
> When i developp with CF, it's easy to detect if record.count is empty or
> not, and do the stuff dependant
> I tried several thing yesterday to do a similar thing with jsp, and
couldn't
> make it work.
> Here is a piece of code :
> ........
> <jrun:sql datasrc="zzzzzzzzzzzzz" id="q1" scope="page"
> username="xxxxxxxxxxxx" password="yyyyyyyyyyy" >
> select * from tbl_users where login='<%=request.getParameter("login")%>'
and
> password='<%=request.getParameter("password")%>'
> </jrun:sql>
>
> <jrun:param id="q1" type="QueryTable"/>
>
> Here, i'd like to detect if recordset is empty or not. If yes, the
redirect
> the user to a form, if not, then continue the process...
>
> I tried to play with q1.getRow(), but with no success...
>
> Any help for a so simple thing !!!
>
> TIA
> Christian Gayton
>
> Net-Lines
> 61 rue Sully
> 69006 Lyon
> Tel : 33+472.829.777
> Fax : 33+472.829.897
> http://www.net-lines.com
> [EMAIL PROTECTED]
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists