![]() |
|
![]() |
| LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Jul 2008 Age: 25
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 | what are way to define resultset? Can any body help in Oracle 9i queries ? what is mean by Callable statement? What is Connection Pooling? How to write a entity relationship in oracle 9i? these are i have faced in my interview. Pls help me Thanks in advance |
| | |
| | #2 (permalink) |
| Senior Member Join Date: Feb 2008
Posts: 146
Thanks: 15
Thanked 73 Times in 46 Posts
Rep Power: 11 | Re: what are way to define resultset? A CallableStatement object provides a way to call stored procedures in a standard way for all DBMSs. A stored procedure is stored in a database; the call to the stored procedure is what a CallableStatement object contains. This call is written in an escape syntax that may take one of two forms: one form with a result parameter, and the other without one. A result parameter, a kind of OUT parameter, is the return value for the stored procedure. Both forms may have a variable number of parameters used for input (IN parameters), output (OUT parameters), or both (INOUT parameters). A question mark serves as a placeholder for a parameter. The syntax for invoking a stored procedure using the JDBC API is shown here. Note that the square brackets indicate that what is between them is optional; they are not themselves part of the syntax. {call procedure_name[(?, ?, ...)]} The syntax for a procedure that returns a result parameter is: {? = call procedure_name[(?, ?, ...)]} The syntax for a stored procedure with no parameters would looks this: {call procedure_name} Normally, anyone creating a CallableStatement object would already know that the DBMS being used supports stored procedures and what those procedures are. If one needed to check, however, various DatabaseMetaData methods will supply such information. For instance, the method supportsStoredProcedures will return true if the DBMS supports stored procedure calls, and the method getProcedures will return a description of the stored procedures available. CallableStatement inherits Statement methods, which deal with SQL statements in general, and it also inherits PreparedStatement methods, which deal with IN parameters. All of the methods defined in CallableStatement deal with OUT parameters>OUT parameters or the output aspect of INOUT parameters: registering the JDBC types of the OUT parameters, retrieving values from them, or checking whether a returned value was JDBC NULL. Whereas the getter methods defined in ResultSet (getString, getLong, and so on) retrieve values from a result set, the getter methods in CallableStatement retrieve values from the OUT parameters and/or return value of a stored procedure. ____________________________________________ A connection pool is a cache of database connections maintained by the database so that the connections can be reused when the database receives future requests for data. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and wastes resources. In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database. ____________________________________________ |
| | |
![]() |
| Tags |
| define , resultset |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can we use an #ifdef in a #define | ShivaniX | C | 0 | 13-06-08 04:02 PM |
| Assuming that the DEFINE JCL is | shiva42 | VSAM | 0 | 05-06-08 04:09 PM |
| Where do you define the select statement of the parameter | sandeepkumar.m | Oracle Forms | 0 | 02-06-08 11:50 AM |
| How you define procure | sandeepkumar.m | Oracle Forms | 0 | 02-06-08 11:48 AM |
| How do you define Task Work | ShivaniX | CICS | 0 | 01-06-08 12:42 AM |
| More Interview Questions Here... |