aspose file tools
The moose likes Java in General and the fly likes Unstable data in Resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Unstable data in Resultset" Watch "Unstable data in Resultset" New topic
Author

Unstable data in Resultset

age spets
Ranch Hand

Joined: Aug 07, 2002
Posts: 68
Hi!

Using Websphere Application Server 5.1 and OS400 vs5.2

Have a javaprogram that calls a Stored procedure that delivers a resultset to the java-program. Have had a strange error that comes and goes. Usually the resultset return correct, but sometimes it deliveres some posts with a 'null' value for int fields and '0' for Strings. So same data input to stored procedure deliveres different output. Some posts always come correct and other posts sometimes fails!

Have even tried to declare a variable and not do anything with it of type int, this returns normally 0, but when the program fails in return 'null'. What can be unstable? Have tried to create the procedures again. For me as a java-programmer it seems like its the procedure that goes wrong..

Age Spets
[ January 12, 2005: Message edited by: age spets ]
Prasanna Kulkarni
Greenhorn

Joined: Jan 07, 2004
Posts: 15
Yes off course procedure may be wrong !
But just make sure that, you are not keeping two diff resultset open at a time for a single callable statement, more specifically a resultset opened inside while for a prior resultset.
This may cause this weired behaviour.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unstable data in Resultset
 
Similar Threads
Need a disconnected resultset
getting empty resultset
Java and Sybase nested stored procedures
Java and Sybase nested stored procedures
Passing Database query results through a method to a JTable