Class JDPJdbcDirect

java.lang.Object
   |
   +----JDPJdbcDirect

public class JDPJdbcDirect
extends Object
Class JDPJdbcDirect represents an interface for making a direct JDBC connection rather than connecting to JDBC via JaggServer.


Constructor Index

 o JDPJdbcDirect()

Method Index

 o close()
Close the statement.
 o connect()
Make the connection to the database
 o dispResultSet(ResultSet, Vector)
Load the result set into a vector.
 o execSQL(String, Vector)
Run the SQL and load the results into the vector.
 o execute(String, Vector)
Run the SQL and load the results into the vector then leave the connection open.
 o getColumnCount()
Get the column count for the last query.
 o getCSTR()
Get the current CSTR (Custom Connect String - replaces DSN,UID,PWD,DB,WSID).
 o getJdbcDriver()
Get the fully qualified class name of the JDBC driver.
 o getJdbcPrefix()
Get the prefix to use for connecting to the JDBC driver.
 o getJdbcSuffix()
Get the suffix to use for connecting to the JDBC driver.
 o getMaxRows()
Get maximum number of rows.
 o getPWD()
Get the user password.
 o getRowCount()
Get the row count for the last query.
 o getStatement()
Get the statement handle for this connection.
 o getTimeOut()
Get the SQL timeout.
 o getUID()
Get the user id.
 o setCSTR(String)
Set CSTR (Custom Connect String - replaces DSN,UID,PWD,DB,WSID).
 o setJdbcDriver(String)
Set the fully qualified class name of the JDBC driver.
 o setJdbcPrefix(String)
Set the prefix to use for connecting to the JDBC driver.
 o setJdbcSuffix(String)
Set the suffix to use for connecting to the JDBC driver.
 o setMaxRows(int)
Set the maximum number of rows to return.
 o setPWD(String)
Set the user password for the query.
 o setTimeOut(int)
Set the SQL timeout.
 o setUID(String)
Set the user id for the query.

Constructors

 o JDPJdbcDirect
 public JDPJdbcDirect()

Methods

 o connect
 public Connection connect() throws Exception
Make the connection to the database

Returns:
the handle for this connection.
 o getStatement
 public Statement getStatement()
Get the statement handle for this connection.

Returns:
the statement handle for this connection.
 o close
 public void close() throws SQLException
Close the statement.

 o execute
 public int execute(String sqlString,
                    Vector v)
Run the SQL and load the results into the vector then leave the connection open.

Parameters:
sqlString - the sql to run.
result - vector the vector to load.
Returns:
the number of rows loaded.
 o execSQL
 public int execSQL(String sqlString,
                    Vector v)
Run the SQL and load the results into the vector.

Parameters:
sqlString - the sql to run.
result - vector the vector to load.
Returns:
the number of rows loaded.
 o dispResultSet
 public int dispResultSet(ResultSet rs,
                          Vector v) throws SQLException
Load the result set into a vector.

Parameters:
rs - the result set to load into the vector.
result - vector the vector to load.
Returns:
the number of rows loaded.
 o setJdbcDriver
 public void setJdbcDriver(String jdbcDriver)
Set the fully qualified class name of the JDBC driver.

Parameters:
jcbdDriver - the fully qualified class name of the JDBC driver.
 o getJdbcDriver
 public String getJdbcDriver()
Get the fully qualified class name of the JDBC driver.

Returns:
jcbdDriver the fully qualified class name of the JDBC driver.
 o setJdbcPrefix
 public void setJdbcPrefix(String jdbcPrefix)
Set the prefix to use for connecting to the JDBC driver.

Parameters:
jcbdPrefix - the prefix to use for connecting to the JDBC driver.
 o getJdbcPrefix
 public String getJdbcPrefix()
Get the prefix to use for connecting to the JDBC driver.

Returns:
jcbdPrefix the prefix to use for connecting to the JDBC driver.
 o setJdbcSuffix
 public void setJdbcSuffix(String jdbcSuffix)
Set the suffix to use for connecting to the JDBC driver.

Parameters:
jcbdSuffix - the suffix to use for connecting to the JDBC driver.
 o getJdbcSuffix
 public String getJdbcSuffix()
Get the suffix to use for connecting to the JDBC driver.

Returns:
jcbdPrefix the suffix to use for connecting to the JDBC driver.
 o setCSTR
 public void setCSTR(String CSTR)
Set CSTR (Custom Connect String - replaces DSN,UID,PWD,DB,WSID).

Parameters:
CSTR - The new CSTR.
 o getCSTR
 public String getCSTR()
Get the current CSTR (Custom Connect String - replaces DSN,UID,PWD,DB,WSID).

Returns:
String containing the CSTR.
 o setUID
 public void setUID(String UID)
Set the user id for the query. Whether or not you need this depends on the database system you are accessing.

Parameters:
UID - The user id.
 o getUID
 public String getUID()
Get the user id.

Returns:
String containing the user id.
 o setPWD
 public void setPWD(String PWD)
Set the user password for the query. Whether or not you need this depends on the database system you are accessing.

Parameters:
PWD - The password.
 o getPWD
 public String getPWD()
Get the user password.

Returns:
String containing the user password.
 o setMaxRows
 public void setMaxRows(int maxRows)
Set the maximum number of rows to return. Defaults to no limit. It is good practice to limit this to a sensible value to avoid overloading the server or client with queries that might return many more rows than expected.

Parameters:
maxRows - The maximum rows to return.
 o getMaxRows
 public int getMaxRows()
Get maximum number of rows.

Returns:
int containing the maximum.
 o setTimeOut
 public void setTimeOut(int timeOut)
Set the SQL timeout.

Parameters:
timeOut - The timeout in seconds.
 o getTimeOut
 public int getTimeOut()
Get the SQL timeout.

Returns:
int containing the timeout.
 o getColumnCount
 public int getColumnCount()
Get the column count for the last query. If an error occurred in the last query, the column count will be zero. This is set by execSQL().

Returns:
Integer containing the column count.
 o getRowCount
 public int getRowCount()
Get the row count for the last query. If an error occurred in the last query, the error return from execSQL() will be stored here.

Returns:
Integer containing the row count.