Stored procedures using Poolman and JSQLConnect.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   harpreet_walia
Posted On:   Friday, January 4, 2002 02:20 AM

We are tying to use poolman and jsqlconnect to execute a stored procedure on sql server 2000. We are facing the following problems. when we execute the stored procedure we are unable to close the callable statement. our code is something like this: JDBCPool newPool = new JDBCPool(meta); SQLManager sqlmanager = SQLManager.getInstance(); sqlmanager.addPool("myPool", newPool); Connection con = sqlmanager.requestConnection("myPool"); CallableStatement cs = con.prepareCall("{call SP_ADDNEWSUBJECT('test',1)}"); cs.executeUpdate(); cs.close(); con.close(); sqlmanager.returnConnection("m   More>>


We are tying to use poolman and jsqlconnect to execute a stored procedure on sql server 2000. We are facing the following problems.


when we execute the stored procedure we are unable to close the callable statement.


our code is something like this:

JDBCPool newPool = new JDBCPool(meta);

SQLManager sqlmanager = SQLManager.getInstance();

sqlmanager.addPool("myPool", newPool);

Connection con = sqlmanager.requestConnection("myPool");

CallableStatement cs = con.prepareCall("{call SP_ADDNEWSUBJECT('test',1)}");

cs.executeUpdate();

cs.close();

con.close();

sqlmanager.returnConnection("myPool", con);


The above code gives a error when we do cs.close() and throws a null pointer exception.



Please try to guide us.

Thanks in advance!



Harpreet    <<Less
About | Sitemap | Contact