Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and Relational Databases and the fly likes How to return a table from MS SQL servers Stored Procd.  to Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "How to return a table from MS SQL servers Stored Procd.  to Java" Watch "How to return a table from MS SQL servers Stored Procd.  to Java" New topic
Author

How to return a table from MS SQL servers Stored Procd. to Java

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2904
    
    1

hi all,
Im new to JDBC and stored procedure
here is my problem : I want to return a table OR a select statement result ( which is table, as per my knowledge ) from MS SQL server`s Stored Procedure to my java app.


The select statement takes the result from other parameter which i passed to it at run time.. I used prepareStatement(? = call myProc( ? , ?)) , but what shud i take in first ? , so that i can iterate over it ( like a ResultSet ) and gets the values. It ll be very helpful if clear this with example ..

thankx in advance..


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to return a table from MS SQL servers Stored Procd. to Java
 
It's not a secret anymore!