|
PROUD_API | CAdoConnection (ADODB::_Connection *conn) |
|
PROUD_API void | OpenEx (const TCHAR *pszConnStr, const TCHAR *AppName) |
|
void | Open (const TCHAR *pszConnStr) |
|
PROUD_API void | OpenEx (const TCHAR *pszConnStr, const TCHAR *AppName, DbmsType Type) |
|
void | Open (const TCHAR *pszConnStr, DbmsType Type) |
|
PROUD_API void | Close () |
|
PROUD_API void | Close_NoThrow () |
|
PROUD_API bool | IsOpened () |
|
PROUD_API long | Execute (const TCHAR *lpszSQL) |
|
PROUD_API long | Execute (CAdoRecordset &outputRecords, const TCHAR *lpszSQL) |
|
void | BeginTrans () |
|
void | RollbackTrans () |
|
void | CommitTrans () |
|
DMBS link object of ADO Wrapper API
- If you access other thread with this object, it will occur some problems (e.g. race condition) So we recommend to use this object with changing local variable when you needed. However it is better to leave process object without using to improve performance. Please refer to About ADO connection pooling for more detail.
- Before creating this object, at least once of Colnitialize must be called. It will be much convenient if the following syntax is included in the thread main function.
- Function that checks whether or not critical section has been touched while accessing DB: ADODB_RefCriticalSection, ADODB_RecommendCriticalSectionProc
void Proud::CAdoConnection::BeginTrans |
( |
| ) |
|
|
inline |
PROUD_API void Proud::CAdoConnection::Close |
( |
| ) |
|
PROUD_API void Proud::CAdoConnection::Close_NoThrow |
( |
| ) |
|
void Proud::CAdoConnection::CommitTrans |
( |
| ) |
|
|
inline |
PROUD_API long Proud::CAdoConnection::Execute |
( |
const TCHAR * |
lpszSQL | ) |
|
Executes SQL syntax. Can use as printf(). SQL syntax
- Returns
- Number of records affected by stored procedure; 0 if no rows were affected or the statement failed; and -1 for SELECT statements
PROUD_API long Proud::CAdoConnection::Execute |
( |
CAdoRecordset & |
outputRecords, |
|
|
const TCHAR * |
lpszSQL |
|
) |
| |
Executes SQL syntax. The result gets stored at outputRecords.
- Parameters
-
outRecordset | Recordset of results to get. SQL syntax |
- Returns
- Number of records affected by stored procedure; 0 if no rows were affected or the statement failed; and -1 for SELECT statements
PROUD_API bool Proud::CAdoConnection::IsOpened |
( |
| ) |
|
Is ADO object connected to DB server?
- Returns
- true if it succeed to connect DB;false if it failed to connect DB
void Proud::CAdoConnection::Open |
( |
const TCHAR * |
pszConnStr | ) |
|
|
inline |
This method connects to DB. Refer to OpenEx guideline for more details.
- Parameters
-
pszConnStr | DB Connection String |
void Proud::CAdoConnection::Open |
( |
const TCHAR * |
pszConnStr, |
|
|
DbmsType |
Type |
|
) |
| |
|
inline |
This method connects to DB. Refer to OpenEx guideline for more details.
- Parameters
-
pszConnStr | DB Connection String |
PROUD_API void Proud::CAdoConnection::OpenEx |
( |
const TCHAR * |
pszConnStr, |
|
|
const TCHAR * |
AppName |
|
) |
| |
This method connects to DB. It has a function that expanse ADODB.Connection.
- Parameters
-
pszConnStr | DBMS link string
- It follows the rule of ADO DB connection string. Refer to http://www.connectionstrings.com/ for more details.
- If Driver or Provider is not included, use sqloledb as provider. Below is an example.
Data Source=.;Database=ProudDB-Test;Trusted_Connection=yes
Data Source=.;Database=ProudDB-Test;user id=xxx;password=yyy
|
AppName | Name being displayed on SQL Server Enterprise Manager. This method helps detecting dead-lock when adding a name that points to a specific routine to the name of connection. If you don't insert this method, this will be ignores. |
PROUD_API void Proud::CAdoConnection::OpenEx |
( |
const TCHAR * |
pszConnStr, |
|
|
const TCHAR * |
AppName, |
|
|
DbmsType |
Type |
|
) |
| |
TODO:translate needed. This method connects to DB. It has a function that expans ADODB.Connection.
- Parameters
-
pszConnStr | DBMS link string
- It follows the rule of ADO DB connection string. Refer to http://www.connectionstrings.com/ for more details. Below is one example.
Data Source=.;Database=ProudDB-Test;Trusted_Connection=yes
Data Source=.;Database=ProudDB-Test;user id=xxx;password=yyy
Driver={MySQL ODBC 5.1 Driver};server=xxx.xxx.xxx.xxx;port=3306;Database=TableName;User ID=UserID;Password=yyy;
|
AppName | Name being displayed on SQL Server Enterprise Manager. This method helps detecting dead-lock when adding a name that points to a specific routine to the name of connection. It ignores if you don't insert this method. |
Type | This inserts enum value of DbmsType such as for Sql,MySql and etc.(MsSql internally uses sqloledb Provider.) |
void Proud::CAdoConnection::RollbackTrans |
( |
| ) |
|
|
inline |