BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.jdbc.informix4
Class Statement

java.lang.Object
  |
  +--weblogic.jdbc.informix4.BaseHandler
        |
        +--weblogic.jdbc.informix4.Statement

public class Statement
extends BaseHandler
implements java.sql.Statement, IStatement

This class is documented only for WebLogic extensions to JDBC. For all other methods, see the JDBC spec and related documentation.

Author:
Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved.
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
protected static int AlterIndexType
           
protected static int AlterType
           
protected static int BeginType
           
protected static byte[] BLOBUpdateTerminator
           
protected static int byteType
           
protected static int charType
           
protected static int CommitType
           
protected  weblogic.jdbc.informix4.Connection connection
           
protected  int count
           
protected static int CreateIndexType
           
protected static int CreateProcedureType
           
protected static int CreateRoleType
           
protected static int CreateSchemaType
           
protected static int CreateSynonymType
           
protected static int CreateTempTableType
           
protected static int CreateTriggerType
           
protected static int CreateType
           
protected static int CreateViewType
           
static int CSClass
           
protected  int cursorID
           
protected static int DeleteAllType
           
protected static int DeleteType
           
protected static int DropIndexType
           
protected static int DropProcedureType
           
protected static int DropRoleType
           
protected static int DropSynonymType
           
protected static int DropTableType
           
protected static int DropTriggerType
           
protected static int DropViewType
           
protected  boolean enableEscapeProcessing
          JDK 1.2: combine with PStatement method protected InformixInputStream doEscapeProcessing(String iSQL) throws SQLException { return null; // return sql without modifications (PreparedStatement will do the processing) }
protected  java.lang.String encoding
           
 boolean escQuotes
           
protected  int exceptionSeverity
           
protected static byte[] FourNulls
           
protected static int GrantType
           
protected static int HostInfoOffsetBegin
           
protected static byte[] Informix2BCursorName
           
protected static int InformixAcceptType
           
protected static byte[] InformixAckPacket
           
protected static byte[] InformixAckUpdate_1
           
protected static byte[] InformixAckUpdate_3
           
protected static byte[] InformixBLOBHeaderTail
           
protected static byte[] InformixBLOBInsertID
           
protected static byte[] InformixBLOBInsertTerminator
           
protected static byte[] InformixCursorName_1
           
protected static byte[] InformixCursorName_3
           
protected static byte[] InformixCursorName_5
           
protected static byte[] InformixDBAckPacket
           
protected static byte[] InformixDBNameHeader
           
protected  byte[] InformixDBResponse
           
protected static byte[] InformixEmptyID
          writeBlobs for prepared statements with BLOBs write the blobs in the form 0x00, 0x27, (short which = number of bytes <= 1024) then write 0x00,0x27, 0x00, 0x00 continue the above until untill all BLOBs are transferred.
protected static byte[] InformixEmptyKey
           
protected static byte[] InformixHeadDelimiter
           
protected static byte[] InformixHostInfo
           
protected  byte[] InformixInsertParams
           
protected static int InformixInsertType
           
protected static byte[] InformixMagicPacket
           
protected static int InformixMetaDataType
           
protected static byte[] InformixNullTail
           
protected static byte[] InformixPostMetaPacket
           
protected static byte[] InformixPostTermMetaPacket
           
static byte[] InformixPreparedStatement
           
protected static int InformixProcMetaDataType
           
protected static int InformixResponseType
          getMoreResults moves to a Statement's next result.
protected static int InformixResultType
           
protected static int InformixSelectIntoType
           
protected static int InformixSQLErrorType
           
protected static byte[] InformixTailDelimiter
           
protected static int InformixUpdateType
           
protected static byte[] InformixVersionPacket
           
protected  java.util.Vector inParameters
           
protected static int kErrorLoginFailed
           
protected static int kMsWarningHeader
           
protected static int LockTableType
           
protected  int majorDBMSVersion
           
protected static int MaxInfoLength
           
protected  boolean needsResult
           
protected  boolean newsql
           
protected  java.util.Vector outParameters
           
protected  weblogic.jdbc.informix4.ResultSet outResults
           
static int PSClass
           
 java.lang.String pStmtSql
           
protected  SimpleOutputStream query
           
protected static int RenameColumnType
           
protected static int RenameTableType
           
protected  SimpleInputStream reply
           
protected  java.sql.ResultSet result
           
protected static int RevokeType
           
protected static int RollbackType
           
static int SClass
           
protected static int SetDebugFileType
           
protected static int SetExplainType
           
protected static int SetIsolationType
           
protected static int SetLockModeType
           
protected static int SetLogType
           
protected static int SetOptimizationType
           
protected static int SetPDQType
           
protected static int SetRoleType
           
protected static int StartViolationsType
           
protected static int StopViolationsType
           
protected static int textType
           
protected static int UnLockTableType
           
protected static int UpdateAllType
           
protected static int UpdateStatisticsProcType
           
protected static int UpdateStatisticsType
           
protected static int vcharType
           
 
Fields inherited from class weblogic.jdbc.informix4.BaseHandler
closed, kInformixProtocol, kMicrosoftProtocol, kOracleProtocol, kSybaseProtocol, kUnknownProtocol, unique, warnings
 
Method Summary
 void addBatch(java.lang.String sql)
           
 void cancel()
          Cancel can be used by one thread to cancel a statement that is being executed by another thread.
protected static void checkForInformixError(byte[] inResult, SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection)
           
protected  void checkPrepNoBLOBParms(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection)
           
 void clearBatch()
           
 void clearParameters()
          Clears all the ? parameters set using setXXX routines.
 void close()
          Release resources associated with this statement, the statement is usually released automatically when garbage is collected.
protected static boolean compareByteArrays(byte[] inResult, byte[] inExpected)
           
static boolean compareWithExpected(byte[] inResult, byte[] inExpected, SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection)
           
protected  int countBLOBParams()
           
protected  int countPrepParams(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection)
           
protected  weblogic.jdbc.informix4.InformixInputStream doEscapeProcessing(java.lang.String rawSQL)
          Produces an InputStream that will process the sql statement replacing ? parameters with the values defined via setXXX routines.
 boolean execute()
          A prepared SQL query is executed and multiple results sets can be returned.
 boolean execute(java.lang.String sql)
           
 int[] executeBatch()
           
 java.sql.ResultSet executeQuery()
          A prepared SQL query is executed and its ResultSet is returned.
 java.sql.ResultSet executeQuery(java.lang.String iSQL)
          Execute a SQL statement that returns a single ResultSet.
 int executeUpdate()
          Executes the prepared SQL statement and returns an update count (or 0 if no update count).
 int executeUpdate(java.lang.String iSQL)
          Execute a SQL INSERT, UPDATE or DELETE statement.
 java.math.BigDecimal getBigDecimal(int parameterIndex, int scale)
          Get the value of a NUMERIC parameter as a BigDecimal object.
 boolean getBoolean(int parameterIndex)
          Get the value of a BIT parameter as a Java boolean.
 byte getByte(int parameterIndex)
          Get the value of a TINYINT parameter as a Java byte.
 byte[] getBytes(int parameterIndex)
          Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[].
 java.sql.Connection getConnection()
           
 java.sql.Date getDate(int parameterIndex)
          Get the value of a SQL DATE parameter as a Date object.
 double getDouble(int parameterIndex)
          Get the value of a DOUBLE parameter as a Java double.
 int getFetchDirection()
           
 int getFetchSize()
           
 float getFloat(int parameterIndex)
          Get the value of a FLOAT parameter as a Java float.
protected  byte[] getHostInfoData()
           
 int getInt(int parameterIndex)
          Get the value of a INTEGER parameter as a Java int.
protected  byte[] getLoginData(java.lang.String iUser, java.lang.String iPassword, java.lang.String iDBPath, java.lang.String iDBDate, java.lang.String iDBMoney, java.lang.String iDBName, java.lang.String iDBDelimIdent, java.lang.String iDBClientLocale, java.lang.String iDBDBLocale, java.lang.String iSQLHOST)
           
 long getLong(int parameterIndex)
          Get the value of a BIGINT parameter as a Java long.
 int getMaxFieldSize()
           
 int getMaxRows()
          The maxRows limit is the maximum number of rows that a ResultSet can contain.
 boolean getMoreResults()
           
 java.lang.Object getObject(int parameterIndex)
          Get the value of a parameter as a Java object.
 int getQueryTimeout()
          The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
 java.sql.ResultSet getResultSet()
          getResultSet returns the current result as a ResultSet.
 int getResultSetConcurrency()
           
 int getResultSetType()
           
 int getSerialNumber()
          Returns the serial number after an insert.
 java.lang.String getServerVersion()
          Return the server version
 short getShort(int parameterIndex)
          Get the value of a SMALLINT parameter as a Java short.
 int getStmtClass()
           
 java.lang.String getString(int parameterIndex)
          Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.
 java.sql.Time getTime(int parameterIndex)
          Get the value of a SQL TIME parameter as a Time object.
 java.sql.Timestamp getTimestamp(int parameterIndex)
          Get the value of a SQL TIMESTAMP parameter as a Timestamp object.
 int getUpdateCount()
          getUpdateCount returns the current result as an update count; if the result is a ResultSet or there are no more results -1 is returned.
 void informixLogin(weblogic.jdbc.informix4.Connection connection, ConnectionInfo info)
           
 byte[] insertCursorID(byte[] ioData, int inCursorID)
           
protected static boolean printPackets(byte[] inResult, byte[] inExpected)
          JDK 1.2: THESE METHODS ORIGINALLY EMPTY IN STATEMENT, COPY AS IS INTO CONSOLIDATED STATEMENT protected void writeBLOBs(SimpleOutputStream query, SimpleInputStream reply, Connection connection, boolean isCursorName) throws IOException,SQLException { // should be implemented by PREPARED statement } protected void checkPrepNoBLOBParms(SimpleOutputStream query, SimpleInputStream reply, Connection connection) throws SQLException { // implement in PreparedStatement } protected void writePrepParms(SimpleOutputStream query, SimpleInputStream reply, Connection connection) throws IOException, SQLException { // implement in PreparedStatement }
protected static void processAndThrowError(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection, java.lang.String msg)
           
protected static InformixException processError(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection, java.lang.String msg)
           
 void registerOutParameter(int parameterIndex, int sqlType)
          Before executing a stored procedure call you must explicitly call registerOutParameter to register the Type of each out parameter.
 void registerOutParameter(int parameterIndex, int sqlType, int scale)
          Use this version for Numeric or Decimal parameters.
 void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
          When a very large ASCII value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream.
 void setBigDecimal(int parameterIndex, java.math.BigDecimal x)
          Set a parameter to a BigDecimal value.
 void setBinaryStream(int parameterIndex, java.io.InputStream x, int length)
          When a very large binary value is input to a LONGVARBINARY parameter it may be more practical to send it via a java.io.InputStream.
 void setBoolean(int parameterIndex, boolean x)
          Set a parameter to a Java boolean value.
 void setByte(int parameterIndex, byte x)
          Set a parameter to a Java byte value.
 void setBytes(int parameterIndex, byte[] x)
          Set a parameter to a Java array of bytes.
 void setCursorName(java.lang.String name)
          setCursorname defines the SQL cursor name that will be used by subsequent Statement execute methods.
protected  void setDatabase(java.lang.String databaseName)
           
 void setDate(int parameterIndex, java.sql.Date x)
          Set a parameter to a Date value.
 void setDouble(int parameterIndex, double x)
          Set a parameter to a Java double value.
 void setEscapeProcessing(boolean iEnable)
          Enables or disables escape sequence processing in SQL statements (on by default)
 void setFetchDirection(int direction)
           
 void setFetchSize(int rows)
           
 void setFloat(int parameterIndex, float x)
          Set a parameter to a Java float value.
 void setInt(int parameterIndex, int x)
          Set a parameter to a Java int value.
 void setLong(int parameterIndex, long x)
          Set a parameter to a Java long value.
 void setMaxFieldSize(int max)
          The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields.
 void setMaxRows(int max)
          The maxRows limit is set to limit the number of rows that any ResultSet can contain.
 void setNull(int parameterIndex, int sqlType)
          Set a parameter to SQL NULL.
 void setObject(int parameterIndex, java.lang.Object obj)
          Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType)
          This method is like setObject above, but assumes scale of zero.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
          Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.
 void setOutResults(weblogic.jdbc.informix4.ResultSet r)
          JDK 1.2 MOVE THIS TO CALLABLESTATEMENT public boolean execute(String sql) throws SQLException { if (super.execute(sql)) { outResults = (ResultSet)getResultSet(); // Get the results from this procedure return true; } return false; }
 void setQueryTimeout(int seconds)
          The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
 void setShort(int parameterIndex, short x)
          Set a parameter to a Java short value.
 void setStmtClass(int SClass)
           
 void setString(int parameterIndex, java.lang.String x)
          Set a parameter to a Java String value.
 void setTime(int parameterIndex, java.sql.Time x)
          Set a parameter to a Time value.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
          Set a parameter to a Timestamp value.
 void setUnicodeStream(int parameterIndex, java.io.InputStream obj, int length)
          When a very large UNICODE value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream.
static java.lang.String stringFromFloat(float value)
           
protected  void testForLikeEscape(java.lang.String sql)
          Throw and exception if escape procession used while escape processing explicitly disabled.
protected  void throwAndYield(java.lang.String message, java.lang.String location)
          General routine to throw an SQLException and give up the Network Streams
 boolean wasNull()
          An OUT parameter may have the value of SQL NULL; wasNull reports whether the last value read has this special value.
protected  void writeBLOBs(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection, boolean isCursorName)
           
protected  void writePrepParms(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection)
           
protected  void writeStatementType(SimpleOutputStream query, SimpleInputStream reply, weblogic.jdbc.informix4.Connection connection)
          Overriden by prepared statement to set the prepared type
 
Methods inherited from class weblogic.jdbc.informix4.BaseHandler
appendWarning, clearWarnings, complainIfClosed, finalize, getProtocol, getWarnings, isClosed, setProtocol
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SClass

public static final int SClass

PSClass

public static final int PSClass

CSClass

public static final int CSClass

InformixPreparedStatement

public static byte[] InformixPreparedStatement

query

protected SimpleOutputStream query

newsql

protected boolean newsql

kMsWarningHeader

protected static final int kMsWarningHeader

kErrorLoginFailed

protected static final int kErrorLoginFailed

InformixResponseType

protected static final int InformixResponseType
getMoreResults moves to a Statement's next result. It returns true if this result is a ResultSet. getMoreResults also implicitly closes any current ResultSet obtained with getResultSet.

There are no more results when (!getMoreResults() && (getUpdateCount() == -1)

See Also:
execute(java.lang.String)

InformixMetaDataType

protected static final int InformixMetaDataType

InformixSelectIntoType

protected static final int InformixSelectIntoType

InformixUpdateType

protected static final int InformixUpdateType

InformixResultType

protected static final int InformixResultType

InformixAcceptType

protected static final int InformixAcceptType

InformixSQLErrorType

protected static final int InformixSQLErrorType

DeleteType

protected static final int DeleteType

InformixInsertType

protected static final int InformixInsertType

LockTableType

protected static final int LockTableType

UnLockTableType

protected static final int UnLockTableType

CreateType

protected static final int CreateType

DropTableType

protected static final int DropTableType

CreateIndexType

protected static final int CreateIndexType

DropIndexType

protected static final int DropIndexType

GrantType

protected static final int GrantType

RevokeType

protected static final int RevokeType

RenameTableType

protected static final int RenameTableType

RenameColumnType

protected static final int RenameColumnType

AlterType

protected static final int AlterType

UpdateStatisticsType

protected static final int UpdateStatisticsType

DeleteAllType

protected static final int DeleteAllType

UpdateAllType

protected static final int UpdateAllType

BeginType

protected static final int BeginType

CommitType

protected static final int CommitType

RollbackType

protected static final int RollbackType

CreateViewType

protected static final int CreateViewType

DropViewType

protected static final int DropViewType

CreateSynonymType

protected static final int CreateSynonymType

DropSynonymType

protected static final int DropSynonymType

CreateTempTableType

protected static final int CreateTempTableType

SetLockModeType

protected static final int SetLockModeType

AlterIndexType

protected static final int AlterIndexType

SetIsolationType

protected static final int SetIsolationType

SetLogType

protected static final int SetLogType

SetExplainType

protected static final int SetExplainType

CreateSchemaType

protected static final int CreateSchemaType

SetOptimizationType

protected static final int SetOptimizationType

CreateProcedureType

protected static final int CreateProcedureType

DropProcedureType

protected static final int DropProcedureType

InformixProcMetaDataType

protected static final int InformixProcMetaDataType

SetDebugFileType

protected static final int SetDebugFileType

UpdateStatisticsProcType

protected static final int UpdateStatisticsProcType

CreateTriggerType

protected static final int CreateTriggerType

DropTriggerType

protected static final int DropTriggerType

SetPDQType

protected static final int SetPDQType

StartViolationsType

protected static final int StartViolationsType

StopViolationsType

protected static final int StopViolationsType

CreateRoleType

protected static final int CreateRoleType

DropRoleType

protected static final int DropRoleType

SetRoleType

protected static final int SetRoleType

InformixAckPacket

protected static byte[] InformixAckPacket

InformixCursorName_1

protected static byte[] InformixCursorName_1

InformixCursorName_3

protected static byte[] InformixCursorName_3

InformixCursorName_5

protected static byte[] InformixCursorName_5

InformixInsertParams

protected byte[] InformixInsertParams

Informix2BCursorName

protected static byte[] Informix2BCursorName

InformixPostMetaPacket

protected static byte[] InformixPostMetaPacket

InformixPostTermMetaPacket

protected static byte[] InformixPostTermMetaPacket

InformixAckUpdate_1

protected static byte[] InformixAckUpdate_1

InformixAckUpdate_3

protected static byte[] InformixAckUpdate_3

InformixDBResponse

protected byte[] InformixDBResponse

InformixDBNameHeader

protected static byte[] InformixDBNameHeader

InformixNullTail

protected static byte[] InformixNullTail

InformixDBAckPacket

protected static byte[] InformixDBAckPacket

enableEscapeProcessing

protected boolean enableEscapeProcessing
JDK 1.2: combine with PStatement method protected InformixInputStream doEscapeProcessing(String iSQL) throws SQLException { return null; // return sql without modifications (PreparedStatement will do the processing) }

connection

protected weblogic.jdbc.informix4.Connection connection

reply

protected SimpleInputStream reply

result

protected java.sql.ResultSet result

count

protected int count

exceptionSeverity

protected int exceptionSeverity

cursorID

protected int cursorID

encoding

protected java.lang.String encoding

majorDBMSVersion

protected int majorDBMSVersion

pStmtSql

public java.lang.String pStmtSql

inParameters

protected java.util.Vector inParameters

outParameters

protected java.util.Vector outParameters

escQuotes

public boolean escQuotes

charType

protected static int charType

byteType

protected static int byteType

textType

protected static int textType

vcharType

protected static int vcharType

InformixEmptyID

protected static byte[] InformixEmptyID
writeBlobs for prepared statements with BLOBs write the blobs in the form 0x00, 0x27, (short which = number of bytes <= 1024) then write 0x00,0x27, 0x00, 0x00 continue the above until untill all BLOBs are transferred. I don't think there is packet boundry restriction. End with 0x00,0x0C

InformixEmptyKey

protected static byte[] InformixEmptyKey

FourNulls

protected static byte[] FourNulls

InformixBLOBHeaderTail

protected static byte[] InformixBLOBHeaderTail

InformixBLOBInsertID

protected static byte[] InformixBLOBInsertID

InformixHeadDelimiter

protected static byte[] InformixHeadDelimiter

InformixTailDelimiter

protected static byte[] InformixTailDelimiter

InformixBLOBInsertTerminator

protected static byte[] InformixBLOBInsertTerminator

BLOBUpdateTerminator

protected static byte[] BLOBUpdateTerminator

outResults

protected weblogic.jdbc.informix4.ResultSet outResults

needsResult

protected boolean needsResult

InformixMagicPacket

protected static byte[] InformixMagicPacket

HostInfoOffsetBegin

protected static int HostInfoOffsetBegin

MaxInfoLength

protected static int MaxInfoLength

InformixHostInfo

protected static byte[] InformixHostInfo

InformixVersionPacket

protected static byte[] InformixVersionPacket
Method Detail

setStmtClass

public void setStmtClass(int SClass)


getStmtClass

public int getStmtClass()


getSerialNumber

public int getSerialNumber()
Returns the serial number after an insert. To use this method (a WebLogic jdbcKona/Informix4 extension to JDBC) you must cast your Statement object to weblogic.jdbc.informix4.Statement.

Returns:
Serial number, if it existsto-

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String iSQL)
                                throws java.sql.SQLException
Execute a SQL statement that returns a single ResultSet.
Specified by:
executeQuery in interface java.sql.Statement

Parameters:
sql - typically this is a static SQL SELECT statement
Returns:
a ResultSet that contains the data produced by the query; never null

executeUpdate

public int executeUpdate(java.lang.String iSQL)
                  throws java.sql.SQLException
Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.
Specified by:
executeUpdate in interface java.sql.Statement

Parameters:
sql - a SQL INSERT, UPDATE or DELETE statement or a SQL statement that returns nothing
Returns:
either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing

execute

public boolean execute(java.lang.String sql)
                throws java.sql.SQLException
Specified by:
execute in interface java.sql.Statement


writeStatementType

protected void writeStatementType(SimpleOutputStream query,
                                  SimpleInputStream reply,
                                  weblogic.jdbc.informix4.Connection connection)
                           throws java.io.IOException,
                                  java.sql.SQLException
Overriden by prepared statement to set the prepared type


testForLikeEscape

protected void testForLikeEscape(java.lang.String sql)
                          throws java.sql.SQLException
Throw and exception if escape procession used while escape processing explicitly disabled.


close

public void close()
           throws java.sql.SQLException
Release resources associated with this statement, the statement is usually released automatically when garbage is collected. Related ResultSet objects are also closed.
Specified by:
close in interface java.sql.Statement

Overrides:
close in class BaseHandler

getMaxFieldSize

public int getMaxFieldSize()
                    throws java.sql.SQLException
Specified by:
getMaxFieldSize in interface java.sql.Statement


setMaxFieldSize

public void setMaxFieldSize(int max)
                     throws java.sql.SQLException
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded.
Specified by:
setMaxFieldSize in interface java.sql.Statement

Parameters:
max - the new max column size limit; zero means unlimited

getMaxRows

public int getMaxRows()
               throws java.sql.SQLException
The maxRows limit is the maximum number of rows that a ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.
Specified by:
getMaxRows in interface java.sql.Statement

Returns:
the current max row limit; zero means unlimited

setMaxRows

public void setMaxRows(int max)
                throws java.sql.SQLException
The maxRows limit is set to limit the number of rows that any ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.
Specified by:
setMaxRows in interface java.sql.Statement

Parameters:
max - the new max rows limit; zero means unlimited

getQueryTimeout

public int getQueryTimeout()
                    throws java.sql.SQLException
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.
Specified by:
getQueryTimeout in interface java.sql.Statement

Returns:
the current query timeout limit in seconds; zero means unlimited

setQueryTimeout

public void setQueryTimeout(int seconds)
                     throws java.sql.SQLException
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.
Specified by:
setQueryTimeout in interface java.sql.Statement

Parameters:
seconds - the new query timeout limit in seconds; zero means unlimited

cancel

public void cancel()
            throws java.sql.SQLException
Cancel can be used by one thread to cancel a statement that is being executed by another thread.
Specified by:
cancel in interface java.sql.Statement


setCursorName

public void setCursorName(java.lang.String name)
                   throws java.sql.SQLException
setCursorname defines the SQL cursor name that will be used by subsequent Statement execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If the database doesn't support positioned update/delete, this method is a noop.

Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a Connection.

Specified by:
setCursorName in interface java.sql.Statement

Parameters:
name - the new cursor name.

getResultSet

public java.sql.ResultSet getResultSet()
getResultSet returns the current result as a ResultSet. It should only be called once per result.

Specified by:
getResultSet in interface java.sql.Statement

Returns:
the current result as a ResultSet; null if the result is an update count or there are no more results
See Also:
execute(java.lang.String)

getUpdateCount

public int getUpdateCount()
getUpdateCount returns the current result as an update count; if the result is a ResultSet or there are no more results -1 is returned. It should only be called once per result.

The only way to tell for sure that the result is an update count is to first test to see if it is a ResultSet. If it is not a ResultSet it is either an update count or there are no more results.

Specified by:
getUpdateCount in interface java.sql.Statement

Returns:
the current result as an update count; -1 if it is a ResultSet or there are no more results
See Also:
execute(java.lang.String)

getMoreResults

public boolean getMoreResults()
                       throws java.sql.SQLException
Specified by:
getMoreResults in interface java.sql.Statement


insertCursorID

public byte[] insertCursorID(byte[] ioData,
                             int inCursorID)


printPackets

protected static boolean printPackets(byte[] inResult,
                                      byte[] inExpected)
JDK 1.2: THESE METHODS ORIGINALLY EMPTY IN STATEMENT, COPY AS IS INTO CONSOLIDATED STATEMENT protected void writeBLOBs(SimpleOutputStream query, SimpleInputStream reply, Connection connection, boolean isCursorName) throws IOException,SQLException { // should be implemented by PREPARED statement } protected void checkPrepNoBLOBParms(SimpleOutputStream query, SimpleInputStream reply, Connection connection) throws SQLException { // implement in PreparedStatement } protected void writePrepParms(SimpleOutputStream query, SimpleInputStream reply, Connection connection) throws IOException, SQLException { // implement in PreparedStatement }


checkForInformixError

protected static void checkForInformixError(byte[] inResult,
                                            SimpleOutputStream query,
                                            SimpleInputStream reply,
                                            weblogic.jdbc.informix4.Connection connection)
                                     throws InformixException


processAndThrowError

protected static void processAndThrowError(SimpleOutputStream query,
                                           SimpleInputStream reply,
                                           weblogic.jdbc.informix4.Connection connection,
                                           java.lang.String msg)
                                    throws InformixException


processError

protected static InformixException processError(SimpleOutputStream query,
                                                SimpleInputStream reply,
                                                weblogic.jdbc.informix4.Connection connection,
                                                java.lang.String msg)
                                         throws InformixException


compareByteArrays

protected static boolean compareByteArrays(byte[] inResult,
                                           byte[] inExpected)
                                    throws InformixException


setDatabase

protected void setDatabase(java.lang.String databaseName)
                    throws java.io.IOException,
                           InformixException


compareWithExpected

public static boolean compareWithExpected(byte[] inResult,
                                          byte[] inExpected,
                                          SimpleOutputStream query,
                                          SimpleInputStream reply,
                                          weblogic.jdbc.informix4.Connection connection)
                                   throws InformixException


setEscapeProcessing

public void setEscapeProcessing(boolean iEnable)
                         throws java.sql.SQLException
Enables or disables escape sequence processing in SQL statements (on by default)
Specified by:
setEscapeProcessing in interface java.sql.Statement


doEscapeProcessing

protected weblogic.jdbc.informix4.InformixInputStream doEscapeProcessing(java.lang.String rawSQL)
                                                                  throws java.sql.SQLException
Produces an InputStream that will process the sql statement replacing ? parameters with the values defined via setXXX routines.


executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
A prepared SQL query is executed and its ResultSet is returned.


executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Executes the prepared SQL statement and returns an update count (or 0 if no update count).


execute

public boolean execute()
                throws java.sql.SQLException
A prepared SQL query is executed and multiple results sets can be returned.


countBLOBParams

protected int countBLOBParams()


countPrepParams

protected int countPrepParams(SimpleOutputStream query,
                              SimpleInputStream reply,
                              weblogic.jdbc.informix4.Connection connection)
                       throws java.sql.SQLException


checkPrepNoBLOBParms

protected void checkPrepNoBLOBParms(SimpleOutputStream query,
                                    SimpleInputStream reply,
                                    weblogic.jdbc.informix4.Connection connection)
                             throws java.sql.SQLException


writePrepParms

protected void writePrepParms(SimpleOutputStream query,
                              SimpleInputStream reply,
                              weblogic.jdbc.informix4.Connection connection)
                       throws java.io.IOException,
                              java.sql.SQLException


writeBLOBs

protected void writeBLOBs(SimpleOutputStream query,
                          SimpleInputStream reply,
                          weblogic.jdbc.informix4.Connection connection,
                          boolean isCursorName)
                   throws java.io.IOException,
                          java.sql.SQLException


clearParameters

public void clearParameters()
                     throws java.sql.SQLException
Clears all the ? parameters set using setXXX routines.


setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws java.sql.SQLException
Set a parameter to SQL NULL.

Note: You must specify the parameter's SQL type.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
sqlType - SQL type code defined by Types

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws java.sql.SQLException
Set a parameter to a Java boolean value. The driver converts this to a SQL BIT value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws java.sql.SQLException
Set a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setShort

public void setShort(int parameterIndex,
                     short x)
              throws java.sql.SQLException
Set a parameter to a Java short value. The driver converts this to a SQL SMALLINT value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setInt

public void setInt(int parameterIndex,
                   int x)
            throws java.sql.SQLException
Set a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setLong

public void setLong(int parameterIndex,
                    long x)
             throws java.sql.SQLException
Set a parameter to a Java long value. The driver converts this to a SQL BIGINT value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws java.sql.SQLException
Set a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws java.sql.SQLException
Set a parameter to a Java double value. The driver converts this to a SQL DOUBLE value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

stringFromFloat

public static java.lang.String stringFromFloat(float value)


setBigDecimal

public void setBigDecimal(int parameterIndex,
                          java.math.BigDecimal x)
                   throws java.sql.SQLException
Set a parameter to a BigDecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setString

public void setString(int parameterIndex,
                      java.lang.String x)
               throws java.sql.SQLException
Set a parameter to a Java String value. The driver converts this to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments size relative to the driver's limits on VARCHARs) when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws java.sql.SQLException
Set a parameter to a Java array of bytes. The driver converts this to a SQL VARBINARY or LONGVARBINARY (depending on the arguments size relative to the driver's limits on VARBINARYs) when it sends

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
             throws java.sql.SQLException
Set a parameter to a Date value. The driver converts this to a SQL DATE value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
             throws java.sql.SQLException
Set a parameter to a Time value. The driver converts this to a SQL TIME value when it sends it to the database.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException
Set a parameter to a Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database. This method handles the INFORMIX DATETIME datatype for precision down to YEAR TO FRACTION(5) (and anything in between). If the java.sql.Timestamp has nanosecond precision less than .00001, the digits after the 5th place are truncated.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the parameter value

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           int length)
                    throws java.sql.SQLException
When a very large ASCII value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java input stream which contains the ASCII parameter value
length - the number of bytes in the stream

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream obj,
                             int length)
                      throws java.sql.SQLException
When a very large UNICODE value is input to a LONGVARCHAR parameter it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java input stream which contains the UNICODE parameter value @param length the number of bytes in the stream

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            int length)
                     throws java.sql.SQLException
When a very large binary value is input to a LONGVARBINARY parameter it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.

Note: this stream object can either be a standard Java stream object, or your own subclass that implements the standard interface.

Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java input stream which contains the binary parameter value
length - the number of bytes in the stream

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The given Java object will be converted to the targetSqlType before being sent to the database.

Note that this method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type and using a targetSqlType of Types.OTHER.

Parameters:
parameterIndex - The first parameter is 1, the second is 2, ...
x - The object containing the input parameter value
targetSqlType - The SQL type (as defined in Types) to be sent to the database. The scale argument may further qualify this type.
scale - For Types.DECIMAL or Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored,
See Also:
Types

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType)
               throws java.sql.SQLException
This method is like setObject above, but assumes scale of zero.


setObject

public void setObject(int parameterIndex,
                      java.lang.Object obj)
               throws java.sql.SQLException

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument java object will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type.

Parameters:
parameterIndex - The first parameter is 1, the second is 2, ...
x - The object containing the input parameter value

throwAndYield

protected void throwAndYield(java.lang.String message,
                             java.lang.String location)
                      throws java.sql.SQLException
General routine to throw an SQLException and give up the Network Streams


setOutResults

public void setOutResults(weblogic.jdbc.informix4.ResultSet r)
JDK 1.2 MOVE THIS TO CALLABLESTATEMENT public boolean execute(String sql) throws SQLException { if (super.execute(sql)) { outResults = (ResultSet)getResultSet(); // Get the results from this procedure return true; } return false; }


registerOutParameter

public void registerOutParameter(int parameterIndex,
                                 int sqlType)
                          throws java.sql.SQLException
Before executing a stored procedure call you must explicitly call registerOutParameter to register the Type of each out parameter.

Note: When reading the value of an out parameter you must use the getXXX method whose Java type XXX corresponds to the parameter's registered SQL type.

Parameters:
parameterIndex - the first parameter is 1, the second is 2,...
sqlType - SQL type code defined by Types; for parameters of type Numeric or Decimal use the version of registerOutParameter that accepts a scale value
See Also:
Type

registerOutParameter

public void registerOutParameter(int parameterIndex,
                                 int sqlType,
                                 int scale)
                          throws java.sql.SQLException
Use this version for Numeric or Decimal parameters.


wasNull

public boolean wasNull()
                throws java.sql.SQLException
An OUT parameter may have the value of SQL NULL; wasNull reports whether the last value read has this special value.


getString

public java.lang.String getString(int parameterIndex)
                           throws java.sql.SQLException
Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.


getBoolean

public boolean getBoolean(int parameterIndex)
                   throws java.sql.SQLException
Get the value of a BIT parameter as a Java boolean.


getByte

public byte getByte(int parameterIndex)
             throws java.sql.SQLException
Get the value of a TINYINT parameter as a Java byte.


getShort

public short getShort(int parameterIndex)
               throws java.sql.SQLException
Get the value of a SMALLINT parameter as a Java short.


getInt

public int getInt(int parameterIndex)
           throws java.sql.SQLException
Get the value of a INTEGER parameter as a Java int.


getLong

public long getLong(int parameterIndex)
             throws java.sql.SQLException
Get the value of a BIGINT parameter as a Java long.


getFloat

public float getFloat(int parameterIndex)
               throws java.sql.SQLException
Get the value of a FLOAT parameter as a Java float.


getDouble

public double getDouble(int parameterIndex)
                 throws java.sql.SQLException
Get the value of a DOUBLE parameter as a Java double.


getBigDecimal

public java.math.BigDecimal getBigDecimal(int parameterIndex,
                                          int scale)
                                   throws java.sql.SQLException
Get the value of a NUMERIC parameter as a BigDecimal object.


getBytes

public byte[] getBytes(int parameterIndex)
                throws java.sql.SQLException
Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[].


getDate

public java.sql.Date getDate(int parameterIndex)
                      throws java.sql.SQLException
Get the value of a SQL DATE parameter as a Date object.


getTime

public java.sql.Time getTime(int parameterIndex)
                      throws java.sql.SQLException
Get the value of a SQL TIME parameter as a Time object.


getTimestamp

public java.sql.Timestamp getTimestamp(int parameterIndex)
                                throws java.sql.SQLException
Get the value of a SQL TIMESTAMP parameter as a Timestamp object.


getObject

public java.lang.Object getObject(int parameterIndex)
                           throws java.sql.SQLException
Get the value of a parameter as a Java object.


informixLogin

public void informixLogin(weblogic.jdbc.informix4.Connection connection,
                          ConnectionInfo info)
                   throws java.sql.SQLException


getLoginData

protected byte[] getLoginData(java.lang.String iUser,
                              java.lang.String iPassword,
                              java.lang.String iDBPath,
                              java.lang.String iDBDate,
                              java.lang.String iDBMoney,
                              java.lang.String iDBName,
                              java.lang.String iDBDelimIdent,
                              java.lang.String iDBClientLocale,
                              java.lang.String iDBDBLocale,
                              java.lang.String iSQLHOST)


getHostInfoData

protected byte[] getHostInfoData()


getServerVersion

public java.lang.String getServerVersion()
Return the server version

Returns:
String containing the server version or null

setFetchDirection

public void setFetchDirection(int direction)
                       throws java.sql.SQLException
Specified by:
setFetchDirection in interface java.sql.Statement


getFetchDirection

public int getFetchDirection()
                      throws java.sql.SQLException
Specified by:
getFetchDirection in interface java.sql.Statement


setFetchSize

public void setFetchSize(int rows)
                  throws java.sql.SQLException
Specified by:
setFetchSize in interface java.sql.Statement


getFetchSize

public int getFetchSize()
                 throws java.sql.SQLException
Specified by:
getFetchSize in interface java.sql.Statement


getResultSetConcurrency

public int getResultSetConcurrency()
                            throws java.sql.SQLException
Specified by:
getResultSetConcurrency in interface java.sql.Statement


getResultSetType

public int getResultSetType()
                     throws java.sql.SQLException
Specified by:
getResultSetType in interface java.sql.Statement


addBatch

public void addBatch(java.lang.String sql)
              throws java.sql.SQLException
Specified by:
addBatch in interface java.sql.Statement


clearBatch

public void clearBatch()
                throws java.sql.SQLException
Specified by:
clearBatch in interface java.sql.Statement


executeBatch

public int[] executeBatch()
                   throws java.sql.SQLException
Specified by:
executeBatch in interface java.sql.Statement


getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface java.sql.Statement


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.