Public Member Functions | |
| void | Open (const String &dsn, const String &id, const String &passwd, COdbcWarnings *odbcWarnings=NULL) |
| void | Open (const String &connectionString, COdbcWarnings *odbcWarnings=NULL) |
| void | Close () |
| void | BeginTrans () |
| void | RollbackTrans () |
| void | CommitTrans () |
| bool | IsOpened () |
| int | Execute (const String &query, COdbcWarnings *odbcWarnings=NULL) |
| int | Execute (COdbcRecordset &recordset, const String &query, COdbcWarnings *odbcWarnings=NULL) |
| void | AllocStmtHandle (COdbcHandle *hstmt, OdbcPrepareType typem, COdbcWarnings *odbcWarnings=NULL) |
It is a class that can manage Connection, control Transaction and execute DirectExecute. Register a driver of database that you are using by the ODBC manager and access through DSN(Data Source Name).
| void Proud::COdbcConnection::BeginTrans | ( | ) |
It is used when starting transaction. In case transaction ends by executing RollbackTrans() or CommitTrans(), it is applied only when re-calling.
| void Proud::COdbcConnection::Close | ( | ) |
It is used when disconnection. It has an effect on all COdbcCommand objects and COdbcRecordset objects that have been created by this connection.
| void Proud::COdbcConnection::CommitTrans | ( | ) |
It is used when committing transaction.
| int Proud::COdbcConnection::Execute | ( | const String & | query, |
| COdbcWarnings * | odbcWarnings = NULL |
||
| ) |
It executed a direct query.
| query | It is a query. |
| int Proud::COdbcConnection::Execute | ( | COdbcRecordset & | recordset, |
| const String & | query, | ||
| COdbcWarnings * | odbcWarnings = NULL |
||
| ) |
It executed a direct query.
| recordset | It is a Recordset object that is received when executing SELECT query. |
| query | It is a query. |
| bool Proud::COdbcConnection::IsOpened | ( | ) |
It is used when checking if connection to the database is normal.
| void Proud::COdbcConnection::Open | ( | const String & | dsn, |
| const String & | id, | ||
| const String & | passwd, | ||
| COdbcWarnings * | odbcWarnings = NULL |
||
| ) |
It is used when connecting to the database.
| void Proud::COdbcConnection::Open | ( | const String & | connectionString, |
| COdbcWarnings * | odbcWarnings = NULL |
||
| ) |
It is used when connecting to the database. ex> conn.Open("DSN=MsSqlDsn;UID=root;PWD=1234")
| void Proud::COdbcConnection::RollbackTrans | ( | ) |
It is used when transaction rollback.