Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Multiple resultsets in jturbo and jtds

 
   Database Help (Home) -> JDBC Driver RSS
Next:  Date & time Data Type formatting  
Author Message
Martin

External


Since: Oct 29, 2008
Posts: 1



(Msg. 1) Posted: Wed Oct 29, 2008 6:34 pm
Post subject: Multiple resultsets in jturbo and jtds
Archived from groups: microsoft>public>sqlserver>jdbcdriver (more info?)

I'm upgrading legacy system using java 1.4, MS SQL 2000, and Jturbo
3.0.2 to MS SQL 2005 and jTDS 1.2.2. While testing I found 'Invalid
State: Result Set already closed'. Found a number of multiple
resultsets tied to a single statement:

rs1 = stmt1.executeQuery(sql1);
rs2 = stmt1.executeQuery(sql2);
rs3 = stmt1.executeQuery(sql3);
while(rs1.next()) {...}
while(rs2.next()) {...}
while(rs3.next()) {...}
stmt1.close();

1) I've seen jturbo mention multiple resultsets from a single
statement but not sure if this refers to the code above or callable
statements?
2) jTds mentioned some changes to allow this functionality
(Metadata::supportMultipleResultSets), does this refer to this or
multiple resultsets from a single statement single query?
3) Is it possible to get this working with jtds? Right now I'm
fixing by adding statements for each resultsets but its slow and would
like to avoid going to jTurbo 2005.

Thanks,

Martin

 >> Stay informed about: Multiple resultsets in jturbo and jtds 
Back to top
Login to vote
joe.weinstein

External


Since: Feb 02, 2008
Posts: 15



(Msg. 2) Posted: Thu Oct 30, 2008 6:53 am
Post subject: Re: Multiple resultsets in jturbo and jtds [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 29, 6:34 pm, Martin wrote:
> I'm upgrading legacy system using java 1.4,  MS SQL 2000, and Jturbo
> 3.0.2 to MS SQL 2005 and jTDS 1.2.2.  While testing I found 'Invalid
> State: Result Set already closed'.  Found a number of multiple
> resultsets tied to a single statement:
>
> rs1 = stmt1.executeQuery(sql1);
> rs2 = stmt1.executeQuery(sql2);
> rs3 = stmt1.executeQuery(sql3);
> while(rs1.next()) {...}
> while(rs2.next()) {...}
> while(rs3.next()) {...}
> stmt1.close();
>
> 1) I've seen jturbo mention multiple resultsets from a single
> statement but not sure if this refers to the code above or callable
> statements?
> 2) jTds mentioned some changes to allow this functionality
> (Metadata::supportMultipleResultSets), does this refer to this or
> multiple resultsets from a single statement single query?
> 3)  Is it possible to get this working with jtds?  Right now I'm
> fixing by adding statements for each resultsets but its slow and would
> like to avoid going to jTurbo 2005.
>
> Thanks,
>
> Martin

The JDBC spec mandates that any re-execution of a statement
will automatically close any currently existing result set from that
statement. If some driver chooses to implement it differently then
follow their instructions.
HTH,
Joe Weinstein

 >> Stay informed about: Multiple resultsets in jturbo and jtds 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
JTDS Driver Connect Problem - one works, one doesn't - I'm having a problem connecting to SQL-Server 2005 using the JTDS 1.22 JDBC driver. This occurs for only one of two SQL-Server 2005 instances I have. The specifics are: I have two machines, each loaded with SQL-Server 2005, one a 64-bit Server, an...

Getting zero terminated string through (both jTDS & MS) jd.. - Hi, I am having a curious problem that I verified now with both the MS JDBC Driver 1.2 and jTDS (both show same strange behaviour). The Strangeness is that it looks like I am receiving 0 terminated strings through the jTDS/MS JDBC driver, except the..

MDX and JDBC Driver - Hi all, Anybody know if it possible to connect to an as2000 database and run mdx queries using the microsoft jdbc drivers? thanks, Peter

java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]U.. - Folks, I was getting this exception occasionally and tracked in down to the application server C drive being full. Looks like the drivers are writing to logs (event ?) on this drive. Freeing up space removed the problem. Hope this helps someone. ..

JDBC driver doesn't close socket event after connection.cl.. - Hi I have a Java application (on Red Hat Enterprise) that <font color=purple> ; 1) connects every 10 seconds to an MS/SQL database</font> <font color=purple> ; 2) attempts to get the metadata for a specific table</fo...
   Database Help (Home) -> JDBC Driver All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]