File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Problem while executing Procedures Using Callable Statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem while executing Procedures Using Callable Statement" Watch "Problem while executing Procedures Using Callable Statement" New topic
Author

Problem while executing Procedures Using Callable Statement

vasu devan
Ranch Hand

Joined: Apr 14, 2005
Posts: 38
Hi Friends,

Having probelom in executing Procedures in Database.
I am Using MS-SQL Server ,and connecting the Database through JDBC-ODBC Coonection.Following are the short Description of the Probelom that is Encountering.

1.Created Procedure in MS-SQL Server, which intern have 28 Tables Interaction,ie..,Creating Temprory Tables,Selecting Values from Source Table,Pushing the Selected values into Temprory Tables.
2.Execute Above Procedure through Callable Statement.
working fine,but it is Working only for Selected tables,ie..,only for first few tables not for 28 tables.
3.While executing the same Procedure in MS-Query Analyser,its working Perfect.

My Suggestions or Questions....

Is there any way to improve the execution of Procedures using Callable Statement?if yes, how can achieve that?

Solutions is needed urgently

Thanks in advance

cheers
vasu
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

Vasu,
Are all the tables being used in the same stored proc? If so, it might be timing out. Or are these similar stored procs? If so, check the permissions.

Tuning a stored proc is just like tuning a SQL statement: check execution plan, add indexes, make sure not returning unnecessary data, ...


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
vasu devan
Ranch Hand

Joined: Apr 14, 2005
Posts: 38
hi,

the single procedure has all the tables interaction.if i splitted the same procedures into multiple procedures,then working fine.

i found that some probelom in executing the procedure through Callable statement(While executing same procedure in sql-query analyser its working fine).connected the MS-SQL Server through JDBC-ODBC connection using DSN.whats my question is....

How can i achieve the Execution of multiple trasactions in single procedure using Callable statement?if anyone have idea to improve the above probelom,please provide asap.

Thanks in advance

cheers
vasu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while executing Procedures Using Callable Statement
 
Similar Threads
Problem with Batch
JDBC in MS Sql server
About Hibernate Support for StoredProcedure
getting the last inserted value
Collection as a parameter in a Callable Statement