Method Summary |
|
void | addCachedProcedure(String key, ProcEntry proc) Add a stored procedure to the cache. |
void | addStatement(JtdsStatement statement) Adds a statement object to the list maintained by the connection. |
void | checkLocal(String method) Checks that this connection is in local transaction mode. |
void | checkOpen() Checks that the connection is still open. |
void | clearSavepoints() Releases all savepoints. |
public synchronized void | clearWarnings() |
public synchronized void | close() Releases this Connection object's database and JDBC
resources immediately instead of waiting for them to be automatically
released.
Calling the method close on a Connection object that is
already closed is a no-op.
Note: A Connection object is automatically closed
when it is garbage collected. |
public synchronized void | commit() |
public Statement | createStatement() |
public synchronized Statement | createStatement(int type, int concurrency) |
public Statement | createStatement(int type, int concurrency, int holdability) |
synchronized void | enlistConnection(byte[] oleTranID) Enlists the current connection in a distributed transaction. |
String | getAppName() Retrieves the application name for this connection. |
public boolean | getAutoCommit() |
int | getBatchSize() Retrieves the batch size to be used internally. |
String | getBindAddress() Retrieves the bind address for this connection. |
File | getBufferDir() Returns the directory where data should be buffered to. |
int | getBufferMaxMemory() Retrieves the maximum amount of memory in Kb to buffer for all connections. |
int | getBufferMinPackets() Retrieves the minimum number of packets to buffer per
Statement for this connection. |
synchronized TdsCore | getCachedTds() Retrieves the cached TdsCore or null if
nothing is cached and resets the cache (sets it to null ). |
public String | getCatalog() |
protected String | getCharset() Retrieve the Java charset to use for encoding. |
protected CharsetInfo | getCharsetInfo() Retrieve the CharsetInfo instance used by this connection. |
byte[] | getCollation() Retrieve the SQL Server 2000 default collation. |
synchronized String | getCursorName() Retrieves the next unique cursor name. |
public int | getDatabaseMajorVersion() Retrieves the DBMS major version. |
public int | getDatabaseMinorVersion() Retrieves the DBMS minor version. |
String | getDatabaseName() Retrieves the database name for this connection. |
String | getDatabaseProductName() Retrieves the DBMS product name. |
String | getDatabaseProductVersion() Retrieves the DBMS product version. |
String | getDomainName() Retrieves the domain name for this connection. |
public int | getHoldability() |
String | getInstanceName() Retrieves the instance name for this connection. |
boolean | getLastUpdateCount() Retrieves the status of the lastUpdateCount flag. |
long | getLobBuffer() Retrieves the LOB buffer size. |
int | getLoginTimeout() Retrieves the login timeout for this connection. |
String | getMacAddress() Retrieves the MAC (ethernet) address for this connection. |
int | getMaxPrecision() Retrieves the maximum decimal precision. |
int | getMaxStatements() Retrieves the maximum statement cache size. |
public DatabaseMetaData | getMetaData() |
Semaphore | getMutex() Retrieves the connection mutex and acquires an exclusive lock on the
network connection. |
boolean | getNamedPipe() Retrieves the named pipe setting for this connection. |
int | getNetPacketSize() Retrieves the network packet size. |
int | getPacketSize() Retrieves the packet size for this connection. |
String | getPassword() Retrieves the password for this connection. |
int | getPortNumber() Retrieves the port number for this connection. |
int | getPrepareSql() Retrieves the Prepared SQL method. |
String | getProcName() Retrieves the next unique stored procedure name. |
String | getProgName() Retrieves the program name for this connection. |
public String | getRmHost() Retrieves the host and port for this connection. |
int | getRowCount() Retrieves the current row count on this connection. |
String | getServerName() Retrieves the server name for this connection. |
public int | getServerType() Retrieves the server type. |
SharedSocket | getSocket() Retrive the shared socket. |
int | getSocketTimeout() Retrieves the socket timeout for this connection. |
protected boolean | getSybaseInfo(int flag) Retrieve the Sybase capability data. |
boolean | getTcpNoDelay() Retrieves the tcpNoDelay setting for this connection. |
int | getTdsVersion() Retrieve the TDS protocol version. |
public int | getTextSize() Retrieves the current maximum textsize on this connection. |
public int | getTransactionIsolation() |
public Map | getTypeMap() |
String | getURL() Retrieves the original connection URL. |
boolean | getUseCursors() Indicates whether fast forward only cursors should be used for forward
only result sets. |
boolean | getUseJCIFS() Retrieves the useJCIFS setting for this connection. |
boolean | getUseLOBs() Indicates whether large types (IMAGE and TEXT/NTEXT) should be mapped by
default to LOB types or String and byte[]
respectively. |
boolean | getUseMetadataCache() Retrieves the boolean indicating whether metadata caching
is enabled. |
boolean | getUseNTLMv2() Indicates whether, when doing Windows authentication to an MS SQL server,
NTLMv2 should be used. |
protected boolean | getUseUnicode() Retrieve the sendParametersAsUnicode flag. |
String | getUser() Retrieves the user for this connection. |
public SQLWarning | getWarnings() |
String | getWsid() Retrieves the workstation ID (WSID) for this connection. |
int | getXaState() Retrieves the XA state variable. |
Object | getXid() Gets the XA transaction ID when running in emulation mode. |
boolean | isCharsetSpecified() Retrieves whether a specific charset was requested on creation. |
public boolean | isClosed() |
public boolean | isReadOnly() |
protected boolean | isWideChar() Retrieve the multibyte status of the current character set. |
boolean | isXaEmulation() Retrieves the XA Emulation flag. |
public String | nativeSQL(String sql) |
static void | notImplemented(String method) Reports that user tried to call a method which has not been implemented. |
public CallableStatement | prepareCall(String sql) |
public synchronized CallableStatement | prepareCall(String sql, int type, int concurrency) |
public CallableStatement | prepareCall(String sql, int type, int concurrency, int holdability) |
synchronized String | prepareSQL(JtdsPreparedStatement pstmt, String sql, ParamInfo[] params, boolean returnKeys, boolean cursorNeeded) Try to convert the SQL statement into a statement prepare. |
public PreparedStatement | prepareStatement(String sql) |
public PreparedStatement | prepareStatement(String sql, int autoGeneratedKeys) |
public synchronized PreparedStatement | prepareStatement(String sql, int type, int concurrency) |
public PreparedStatement | prepareStatement(String sql, int type, int concurrency, int holdability) |
public PreparedStatement | prepareStatement(String sql, int[] columnIndexes) |
public PreparedStatement | prepareStatement(String sql, String[] columnNames) |
public void | releaseSavepoint(Savepoint savepoint) |
synchronized void | releaseTds(TdsCore tds) Releases (either closes or caches) a TdsCore . |
void | removeCachedProcedure(String key) Remove a stored procedure from the cache. |
synchronized void | removeStatement(JtdsStatement statement) Removes a statement object from the list maintained by the connection
and cleans up the statement cache if necessary. |
public synchronized void | rollback() |
public void | rollback(Savepoint savepoint) |
synchronized byte[][] | sendXaPacket(int args, byte[] data) Invokes the xp_jtdsxa extended stored procedure on the
server.
Synchronized because it accesses the baseTds .
Parameters: args - the arguments eg cmd, rmid, flags etc. Parameters: data - option byte data eg open string xid etc. |
public synchronized void | setAutoCommit(boolean autoCommit) |
public synchronized void | setCatalog(String catalog) |
void | setClosed() Forces the closed status on the statement if an I/O error has occurred. |
void | setCollation(byte[] collation) Set the default collation for this connection.
Set by a SQL Server 2000 environment change packet. |
protected void | setDBServerInfo(String databaseProductName, int databaseMajorVersion, int databaseMinorVersion, int buildNumber) Update the connection instance with information about the server. |
protected void | setDatabase(String newDb, String oldDb) Called by the protcol to change the current database context. |
public void | setHoldability(int holdability) |
void | setNetPacketSize(int size) Sets the network packet size. |
public void | setReadOnly(boolean readOnly) |
void | setRowCount(int count) Sets the current row count on this connection. |
public Savepoint | setSavepoint() |
public Savepoint | setSavepoint(String name) |
protected void | setServerCharset(String charset) Called by the protocol to change the current character set. |
protected void | setSybaseInfo(int mask) Set the Sybase capability data. |
public void | setTextSize(int textSize) Sets the current maximum textsize on this connection. |
public synchronized void | setTransactionIsolation(int level) |
public void | setTypeMap(Map map) |
void | setXaState(int value) Sets the XA state variable. |
void | setXid(Object xid) Sets the XA transaction ID when running in emulation mode. |
protected void | unpackProperties(Properties info) Transfers the properties to the local instance variables. |