• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Funny issue with ResultSet

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am facing typical issue with ResultSet.
I am using sybase 12.5 server and driver jconn3/jconn2 and java 1.6, I am giving simple query like select * from user and it is returning only the first two records and the remaining it is ignoring. Some of the tables I am not even getting single record even the table is having 20+ records.
The same code is working fine at my home computer and the only diff is I was using sybase dev version.
Is there problem with database configuration?
I appreciate for the help.
thanks and kind regards.
 
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
some things to check:

- are you sure that you connect to the right database,
- with the right user
- to the expected database schema.
The symptoms might tell that you are not seeing the tables that you are expecting.

Check if you get the same results if you query *the same* database withanother query tool, using *the same* user, schema and query.
Regards, Jan
 
Nk Don
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jan,
I appreciate for the help.
I fugured it out that this could be a database configuration related issue. The same code is working fine with the other databses in the server and it is not working when I connect to the new database which we have created. I have created new table in my databse and imported the data from other data base( table structure is same) and not able to read from newly created table and it is working for the old table.
Unfortunately I was not able to reach my DBA....
thanks and kind regards,
Nanda




Jan Cumps wrote:some things to check:

- are you sure that you connect to the right database,
- with the right user
- to the expected database schema.
The symptoms might tell that you are not seeing the tables that you are expecting.

Check if you get the same results if you query *the same* database withanother query tool, using *the same* user, schema and query.
Regards, Jan

 
Nk Don
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the resolution for this.

-I have created some tables and inserted the data in to these tables from database client.
-Try to read this configuration data from my java code and it did not return any data.
-Query executed in database client and able to seee the inserted records.

The actually issue is with the database client, in this particular client aucommit was disabled and the data inserted in to the tables were not committed. The database client was returning the data when I execute the select query with out commiting the data.

I have committed the data explicitely in my database client tool and now able to read the data from my Java code........

It is a silly mistake and also really big lesson for me...
 
Jan Cumps
Bartender
Posts: 2658
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah. Glad you found it.
And thank you for sharing your solution.

Regards, Jan
 
Do you pee on your compost? Does this tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic