Announcement

Collapse
No announcement yet.

DATABASE RESULT SET

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DATABASE RESULT SET

    Hello folks!

    Does anyone know how to know how many rows I got from my SELECT RESULT SET?
    There is a internal variable to control that?

    Thanks. B)

    Alexander

  • #2
    ReATABASE RESULT SET

    I looked long for this too. I did not find anything. I had to write this code

    Code:
    var result = dbConn.executeCachedQuery("SELECT ....;",parameters);
    var count=0;
    while (result.next())
    {
            variable=result.getString(1);
    	count++;
    }

    Comment


    • #3
      ReATABASE RESULT SET

      Hi Bleupomme!

      I got that conclusion as well.
      Thanks for reply!

      Cheers,

      Alexander

      Comment


      • #4
        ReATABASE RESULT SET

        Hi,

        It looks like you can use result.size() to do this. I'm still real new to this, but it looks like the result is a javax.sql.rowset.CachedRowSetImpl. I don't know how much of the object's interface is exposed to the JavaScript (JS is new to me) but size() seems to work anyway

        http://developers.sun.com/docs/jscre...owSetImpl.html

        Jason

        Post edited by: jasonschulz, at: 09/27/2008 13:19

        Comment

        Working...
        X