Nil gawade

Greenhorn
+ Follow
since Jun 14, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nil gawade

Thanks Wendy.

I have tried several code but not working , i am trying to call sql store proc.

I am trying one more way now ,i will post my code incase of any issues or sucess

Thanks.
What I am trying to do is :

I have inline sql in the java code,so we want to move these sql to store proc for better performance.

Instead of inline sql we will call store proc but problem is I am not sure how I can retrieve data from the storeproc, right now it is executing the sql and returning the result set.

So please let me know if we convert below sql to store proc and call the storeproc , how we can retrieve the resultset? I am not sure if it is possible.

Please advice, urgent.



Thanks for reply.

I want to use SQL store procedure.

My actual question is if my proc is returning recordset , then is it possible to retrieve the data in java ?

As I have seen example of IN and OUT param.But i am not clear how i can get the multiple record from my proc ?

Thansk,
Nil
Hi,
how to get result set from the sql store procedure?

Please help me Here is my code:
ResultSet rs = null;
CallableStatement cs =null;

try {
conn = this.getDBConnection();


cs = conn.prepareCall("{?=call usp_getReconciledGroupcast (?,?,?)}");


cs.setString(3, afterDate.toString()); //afterDate
cs.setString(4, toDate.toString()); //EndDate
cs.setInt(2, msPracticeId); //msPracticeid

cs.registerOutParameter(1, Types.VARCHAR);//output
cs.execute();

//Boolean str = cs.getMoreResults();
if (cs.getMoreResults()) {
System.out.println("Getting SOMETHING:::");
}else {
rs = cs.getResultSet();
while (rs.next())
{ }
}


Getting below error : Database error occurred, error code=102:Incorrect syntax near '@P1'.

Please can you give me example with store procedure which return result set?


Thanks.
Ok I am clear by reading other threads


For preparation of Examcode 1Z0-851(Its same to 310-065 SCJP) use below book :

SCJP Sun Certified Programmer for Java 6 Exam 310-065 by Katherine Sierra and Bert Bates



8 years ago
Hello,

Congartulation !!

I am new to the forum , I want to appear for OCJP 1.6 (Examcode 1Z0-851),I would like to know which book should i refer?

I googled and found book Sun Certified Programmer for Java 6 Exam 310-065 which is mostly recommended but i was just confuse as it is saying exam 310-065.

Please help me to collect good study material.

Your help would be appreciated.

Thanks,
Nil
8 years ago
Hello,

Congartulation !!

I am new to the forum , I want to appear for OCJP 1.6 (Examcode 1Z0-851),I would like to know which book should i refer?

I googled and found book Sun Certified Programmer for Java 6 Exam 310-065 which is mostly recommended but i was just confuse as it is saying exam 310-065.

Please help me to collect good study material.

Your help would be appreciated.

Thanks,
Nil
8 years ago