ResultSet columns

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stack
    New Member
    • Sep 2007
    • 40

    ResultSet columns

    Hi all,

    I have a ResultSet object and I want to get the nbr of columns it has. It's easy to find the number of rows by using the absolute(int row) and the getRow() methods. Is there anything similar to find the nbr of columns? Any relevant code or advice would help.

    Thanks a lot
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Get the column count(s) from the ResultSetMetaDa ta (you can get that from the
    ResultSet itself).

    kind regards,

    Jos

    Comment

    • stack
      New Member
      • Sep 2007
      • 40

      #3
      Yep, it worked. Thanks!!

      stack

      Comment

      • itsraghz
        New Member
        • Mar 2007
        • 124

        #4
        But ensure you minimize the operations on ResultSetMetaDa ta. It is the costliest operation you do! Read out the API carefully - if you are using it in Production environment.

        Comment

        Working...