Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to call a Stored Procedure from JDBC?

Answer Posted / rama krishna dwadasi

By using CallableStatement we can call a stored Procedure
from JDBC

CallableStatement:- is an interface available in java.sql
package and is extending PreparedStatement interface.
•It is used to execute stored procedures available in the
database.
•Following is the way to create the CallableStatement object.
a)CallableStatement cs = con.prepareCall(sql);
b)CallableStatement cs = con.prepareCall(sql,int,int);
•One CallableStatement object can be used to invoke one
stored procedure only.
•CallableStatement also provides placeholder mechanism
•Following is the way to invoke the stored procedure.
CallableStatement cs = con.prepareCall(“{call p1 (?,?)}”);

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define how destructors are defined in java?

964


what is thread in Java ?

1097


What is hash code collision?

1003


What is the buffer limit?

981


What is string and its types?

1088


Can we declare a class as abstract without having any abstract method?

948


What is unmodifiable list in java?

901


What is the list interface in java programming?

1038


which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

10949


List some important features of java 10 release?

979


Why stringbuilder is not thread safe in java?

967


What is %02d?

1037


What’s the difference between applets and standalone program?

979


Difference between static synchronization vs. Instance synchronization?

1049


What is garbage collection? Can it be forced to run?

951