|
|||||||||
| Home >> All >> com >> tripi >> asp >> [ ADODB overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.tripi.asp.ADODB
Class Connection

java.lang.Objectcom.tripi.asp.ADODB.Connection
- public class Connection
- extends java.lang.Object
This class represents the ADODB.Connection object. This object handles connections to the database. Implementation status:
- Attributes - Implemented.
- CommandTimeout - Implemented, but ignored.
- ConnectionString - Implemented.
- ConnectionTimeout - Implemented, but ignored.
- CursorLocation - Implemented, but ignored.
- DefaultDatabase - Implemented, but ignored, does not make sense in JDBC
- Errors - Implemented
- IsolationLevel - TODO Not implemented
- Mode - TODO Not implemented
- Properties - TODO Not implemented.
- Provider - TODO Not implemented
- State - Implemented
- Version - TODO Not implemented
- BeginTrans - Implemented
- CommitTrans - Implemented
- RollbackTrans - Implemented
- Close - Implemented
- Execute - Implemented
- Open - Implemented
- OpenSchema - TODO Not implemented
| Nested Class Summary | |
(package private) static class |
Connection.ConnectionInfo
This sub-class is used to return multiple arguments from the parseConnectionInfo(String) function. |
static class |
Connection.ErrorsClass
This inner class contains the list of SQL errors. |
| Field Summary | |
com.tripi.asp.AspCollection |
Attributes
Attributes of this connection |
int |
CommandTimeout
Timeout for commands |
java.lang.String |
ConnectionString
Current connection string |
int |
ConnectionTimeout
Timeout for connections |
int |
CursorLocation
Cursor location, server or client. |
(package private) java.sql.Connection |
cx
Current java.sql.Connection object. |
(package private) org.apache.log4j.Category |
DBG
Debugging category. |
int |
DefaultDatabase
Default database. |
Connection.ErrorsClass |
Errors
List of errors thrown by this class. |
protected boolean |
inTransaction
Are we in a transaction? |
int |
IsolationLevel
Isolation level. |
int |
Mode
Mode for modifying data. |
com.tripi.asp.AspCollection |
Properties
Properties list. |
java.lang.String |
Provider
Provider information |
| Constructor Summary | |
Connection()
Constructor, no arguments. |
|
| Method Summary | |
int |
BeginTrans()
Begin a transaction. |
void |
Close()
Close the current, open database connection. |
void |
CommitTrans()
Commits the current, active transaction, throws an exception if called outside of a transaction. |
RecordSet |
Execute(java.lang.String sql)
Execute the given SQL statement. |
RecordSet |
Execute(java.lang.String sql,
com.tripi.asp.ByRefValue recordsAffected)
Executes the given SQL statement, returning a result value. |
RecordSet |
Execute(java.lang.String sql,
com.tripi.asp.ByRefValue recordsAffected,
int flags)
Executes the given SQL statement, returning a result value. |
void |
OnPageEnd(java.lang.Object ignoreme)
What to do on page end. |
void |
Open()
Open a database using the ConnectionString parameter as the URL. |
void |
Open(java.lang.String url)
Open a database connection, giving only an URL. |
void |
Open(java.lang.String url,
java.lang.String username,
java.lang.String password)
Open a URL with username and password. |
private Connection.ConnectionInfo |
parseConnectionInfo(java.lang.String url)
This function parses the given URL into parts. |
(package private) com.tripi.asp.AspException |
processException(java.lang.Throwable ex)
Process this exception, add it to the error list and re-throw it as an AspException. |
(package private) com.tripi.asp.AspException |
processException(java.lang.Throwable ex,
int errorCode)
Process this exception, add it to the error list and re-throw it as an AspException. |
void |
RollbackTrans()
Rolls back the current, active transaction, throws an exception if called outside of a transaction. |
int |
State()
State, open or closed. |
java.lang.String |
Version()
Obtains the ASP Version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
DBG
org.apache.log4j.Category DBG
- Debugging category.
cx
java.sql.Connection cx
- Current java.sql.Connection object.
inTransaction
protected boolean inTransaction
- Are we in a transaction?
Errors
public Connection.ErrorsClass Errors
- List of errors thrown by this class.
Attributes
public com.tripi.asp.AspCollection Attributes
- Attributes of this connection
CommandTimeout
public int CommandTimeout
- Timeout for commands
ConnectionString
public java.lang.String ConnectionString
- Current connection string
ConnectionTimeout
public int ConnectionTimeout
- Timeout for connections
CursorLocation
public int CursorLocation
- Cursor location, server or client.
DefaultDatabase
public int DefaultDatabase
- Default database.
IsolationLevel
public int IsolationLevel
- Isolation level.
Mode
public int Mode
- Mode for modifying data.
Properties
public com.tripi.asp.AspCollection Properties
- Properties list.
Provider
public java.lang.String Provider
- Provider information
| Constructor Detail |
Connection
public Connection()
- Constructor, no arguments.
| Method Detail |
OnPageEnd
public void OnPageEnd(java.lang.Object ignoreme)
- What to do on page end.
State
public int State()
- State, open or closed.
Version
public java.lang.String Version()
- Obtains the ASP Version.
parseConnectionInfo
private Connection.ConnectionInfo parseConnectionInfo(java.lang.String url)
- This function parses the given URL into parts. It supports the
follow formats:
- jdbc:
- JDBC URLs - driver=
;URL= ;UID= ;PWD= - driver - JDBC driver class, such as org.postgresql.Driver
- URL - JDBC URL, such as jdbc:postgres://database
- UID - Username (optional)
- PWD - Password (optional)
- driver=
- jdbc:
Open
public void Open(java.lang.String url, java.lang.String username, java.lang.String password) throws com.tripi.asp.AspException
- Open a URL with username and password.
Open
public void Open(java.lang.String url) throws com.tripi.asp.AspException
- Open a database connection, giving only an URL.
Open
public void Open()
throws com.tripi.asp.AspException
- Open a database using the ConnectionString parameter as the URL.
BeginTrans
public int BeginTrans()
throws com.tripi.asp.AspException
- Begin a transaction. Returns the transaction level for nested
transactions (not implemented).
CommitTrans
public void CommitTrans()
throws com.tripi.asp.AspException
- Commits the current, active transaction, throws an exception if called
outside of a transaction.
RollbackTrans
public void RollbackTrans()
throws com.tripi.asp.AspException
- Rolls back the current, active transaction, throws an exception if called
outside of a transaction.
Close
public void Close()
throws com.tripi.asp.AspException
- Close the current, open database connection.
Execute
public RecordSet Execute(java.lang.String sql) throws com.tripi.asp.AspException
- Execute the given SQL statement.
Execute
public RecordSet Execute(java.lang.String sql, com.tripi.asp.ByRefValue recordsAffected) throws com.tripi.asp.AspException
- Executes the given SQL statement, returning a result value.
Execute
public RecordSet Execute(java.lang.String sql, com.tripi.asp.ByRefValue recordsAffected, int flags) throws com.tripi.asp.AspException
- Executes the given SQL statement, returning a result value.
processException
com.tripi.asp.AspException processException(java.lang.Throwable ex)
- Process this exception, add it to the error list and re-throw it
as an AspException. Package scope on purpose.
processException
com.tripi.asp.AspException processException(java.lang.Throwable ex, int errorCode)
- Process this exception, add it to the error list and re-throw it
as an AspException. Package scope on purpose.
|
|||||||||
| Home >> All >> com >> tripi >> asp >> [ ADODB overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.tripi.asp.ADODB.Connection