how to find whether a result set is null or not

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to find whether a result set is null or not

Hybrid View

  1. #1
    Join Date
    Aug 2005

    how to find whether a result set is null or not

    hi guys...i am new to jsp...does any one know how to detect whether a result set in null or i was writing a small prog on jsp..and in that prog i hve to check for a value which is there in the database or not..i hve executed the query using

    rs=statement.executeQuery("SELECT * from user_accounts WHERE id='"+record_id+"'");

    here record_id id the primery key

    and i hve written a statement

    }catch(SQLException e)

    and sometimes it doest works that is it doesnt detects if the result set is null

    is the any other way to the same procedure

  2. #2
    Join Date
    Oct 2005
    Use this sentence previously to

    if (rs!=null)
    //Do whatever

    Answer provided by

Similar Threads

  1. String literal result set
    By Hector Diaz in forum Database
    Replies: 1
    Last Post: 10-23-2001, 07:17 PM
  2. Find Dialog - Set the "Look In" path.....
    By Crispin Wright in forum VB Classic
    Replies: 0
    Last Post: 08-23-2001, 12:55 PM
  3. Problems with NetAddUser
    By Jeff Morgan in forum VB Classic
    Replies: 2
    Last Post: 02-13-2001, 11:49 AM
  4. Driving me nuts
    By Robert Gelb in forum VB Classic
    Replies: 3
    Last Post: 01-12-2001, 03:17 PM
  5. Replies: 2
    Last Post: 04-13-2000, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center