The SQL standard says that COUNT should return the value zero if no rows match.
----- Original Message -----
From: "Tariq Hasnain" <tariq_hasnain@usa.net>
To: <InstantDB@enhydra.org>
Sent: Tuesday, April 17, 2001 7:03 PM
Subject: InstantDB: Problem with ResultSet in InstantDB
> Hello there,
>
> I have created a resultset like this.........
>
> PreparedStatement psmtCount = mConn.prepareStatement( "SELECT COUNT(ID) FROM "
> + table + " WHERE TYPE = ?" );
> psmtCount.setString(1,typeName);
> ResultSet rstCount = psmtCount.executeQuery();
> int rows = 0;
> if( rstCount.next() ) {
> rows = rstCount.getInt(1);
> }
>
> actually this ResultSet is null as the query returns nothing but using
> InstantDB as database control is still going in if block, while with other
> databases it is not.......
>
> Please help......
>
> Tariq
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
> -----------------------------------------------------------------------------
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
|