Using DBIntegrator Client for JDBC

[Top] [Prev] [Next] [Bottom]



 

Appendix B: JDBC Extensions

The following member functions are available from the DBIntegrator Client JDBC classes, in addition to the functionality provided by the JDBC specification.

NOTE:  To use the DBIntegrator Client-specific extensions to JDBC, you must cast the java.sql interface to the Simba type.  For example:

java.sql.Connection connection = DriverManager.getConnection(url, "sa", "");
java.sql.PreparedStatement preparedStmt;
simba.jdbc.SimbaParameterMetaData parameterMetaData;
preparedStmt = connection.prepareStatement(sql);
parameterMetaData = ((SimbaPreparedStatement)preparedStatement).getParameterMetaData();


SimbaPreparedStatement

Function Name  Function Description 
getParameterMetaData()  This function returns a class that describes parameters in a prepared statement, if it is available. If the DBMS does not provide descriptions about parameters this function returns null. The SimbaParameterMetaData class is provided below. 

SimbaParameterMetaData

The SimbaParameterMetaData class is provided to describe parameters for prepared and callable statements.
 
Member Variables 
Name  Description 
static int parameterNoNulls  Does not allow nulls. 
static int parameterNullable  Allows nulls. 
static int parameterNullableUnknown  Nullability is unknown. 

Member Functions 
Name  Description 
int getParameterCount()  Returns the number of parameters in the statement. 
int getParameterType(int param)  Returns the SQL type of the parameter, will be one of the enumerated types in java.sql.Types. 
String getParameterTypeName(int param)  Returns the name of the parameter's SQL type. 
int getPrecision(int param)  Returns the precision of the parameter. 
int getScale(int param)  Returns the scale of the parameter. 
int isNullable(int param)  Returns whether the parameter can be null or not. 


[Top] [Prev] [Next] [Bottom]


csr@unify.com

Copyright © 1998-9, 2002, Unify Corporation. All rights reserved.