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 Correct approach ? Stored Proc (returning cursor) Vs Prepared statment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Correct approach ? Stored Proc (returning cursor) Vs Prepared statment" Watch "Correct approach ? Stored Proc (returning cursor) Vs Prepared statment" New topic
Author

Correct approach ? Stored Proc (returning cursor) Vs Prepared statment

prasad kulkarni
Ranch Hand

Joined: Mar 19, 2006
Posts: 66
I have lot of select queries to integrate with my java code.

I have two options to select within :

1. Store procedure which returns cursor
2. Prepared statements

Which one should I use ? Which one is the fastest and a correct approach?

Can java experts please put some pros and cons of both approaches?


scjp, scwcd
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2495
    
    8

1 is proprietary , 2 is portable across databases.

OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Correct approach ? Stored Proc (returning cursor) Vs Prepared statment