Results 1 to 13 of 13
Like Tree2Likes
  • 1 Post By doWhile
  • 1 Post By DarrylBurke

Thread: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

  1. #1
    araknaveen is offline Member
    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Default sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    Hi,

    Few times, jdbc Resultset not getting all 3000 records, showing only 100 records.
    It is happening only in Prod environment. Pleaes help me on this.

    Thanks,
    Naveen
    Last edited by araknaveen; 10-12-2012 at 09:27 PM.

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    Are the production and dev databases both the same server tech/version? i.e. mysql 5.1.x and 5.1.x?

  3. #3
    araknaveen is offline Member
    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    Hi,
    Both dev & prod are same versions. Issue is not there in my local, I pointed my local to prod database but I'm able to see all the records. we're using sybase database.

  4. #4
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    Are you running jboss locally too or from something else like eclipse?

  5. #5
    araknaveen is offline Member
    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    I'm running eclipse with Websphere application server 7.5.

  6. #6
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    That's weird - I'm not familiar with an application server configuration putting constraints on queries. Is it acting as though you set the max record count on a query to 100 or is it more random than that?

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    We have next to no information here.
    Suffice to say that the same query against the same database using the same user will produce the same set of results, presuming no one else has changed the data in between.

    So, there's something about your set up that is different between A and B.
    Only you can find that out.

    For example, we have no idea how you are displaying this.
    We have no idea what pooling strategy you have.
    Are you using JDBC, Hibernate, something else.
    How are you counting the results.
    Etc etc.

    This is, in short, a ridiculously open question.
    Please do not ask for code as refusal often offends.

  8. #8
    araknaveen is offline Member
    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Post JDBC resultset is retreiving only 100 records sometimes from DB, but it has 3000+ rec

    I'm using JDBC code to fetch data from datbase, I put sysouts in PROD and found like most of the times resultset is getting all 3000+ results from database but it is getting exactly 100 records few times. I'm not able to trace the issue as it is happening only in PROD but not in lower environments.
    I'm using RAD with websphere app server, database is sybase.
    Could someone please help me on this. Thanks in advace.

    Thanks,
    Naveen

  9. #9
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    I have merged your new post with your earlier, seemingly identical question from a week ago. I suggest reading post #7, which is quite explicit with regards to the information (or lack thereof) you have provided. Posting the same question again will not change this.
    DarrylBurke likes this.

  10. #10
    araknaveen is offline Member
    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    I'm using JDBC code to fetch data from datbase, I put sysouts in PROD and found like most of the times resultset is getting all 3000+ results from database but it is getting exactly 100 records few times. I'm not able to trace the issue as it is happening only in PROD but not in lower environments. I'm using RAD with websphere app server, database is sybase. Please find my code below:
    view plaincopy to clipboardprint?
    String sqlStatement = "{ call STOREDPROCEDURE_ITEMS(?,?) }";
    try {
    databaseAccess = DatabaseManager.GetDatabaseAccess(true);
    callableStatement = databaseAccess.prepareCall(sqlStatement);
    callableStatement.registerOutParameter(1, Types.INTEGER);
    callableStatement.registerOutParameter(2, Types.VARCHAR);
    try {
    resultset = callableStatement.executeQuery();
    if (resultset != null) {
    while (resultset.next()) {
    item= BuildBasicItem(resultset);
    items.add(item);
    cache.addItemToCache(item);
    }
    }
    System.out.println("items size"+ items.szie());
    } catch (SQLException sqlException) { }
    finally(){
    databaseAccess.close();
    } }

    Could someone please help me on this.

    Thanks, Naveen
    Last edited by araknaveen; 10-24-2012 at 06:18 PM.

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  12. #12
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    doWhile likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  13. #13
    araknaveen is offline Member
    Join Date
    Oct 2012
    Posts
    6
    Rep Power
    0

    Default Re: sometimes, jdbc Resultset not getting all 3000 records, showing only 100 records.

    Hi Robin - I didn't get you.

Similar Threads

  1. deleting records in a db
    By droidus in forum New To Java
    Replies: 1
    Last Post: 11-08-2011, 07:16 PM
  2. JDBC | Unable to update multiple records
    By bittu218 in forum New To Java
    Replies: 5
    Last Post: 06-28-2010, 02:45 PM
  3. insert records
    By rudravaram in forum JDBC
    Replies: 3
    Last Post: 01-03-2010, 05:54 PM
  4. showing records in Jtable
    By Shivraj in forum NetBeans
    Replies: 0
    Last Post: 03-21-2009, 07:16 AM
  5. Getting number of records (JDBC 2.0)
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-11-2008, 08:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •