DBPowerSuite 7.9 Application Programming Interface
ODBC

 

Class Description

An Aggregate of Objects To Manage a Single ODBC Connection

Class Name

OConnectionSet

Parent Class

ULogObject

Header Name

OConnectionSet.h

Language

C++

Author

Brian N. Ceccarelli

Location

Apex, NC

Date Written

November 5, 1999

Last Updated

August 31, 2002

Last Updated By

Brian N. Ceccarelli

Notes

     Even though one can establish a connection to an ODBC just
using the OConnection and OEnvironment classes and then do work
using the OStatement class, it is easier to use OConnectionSet
class to instantiate objects of all 3 classes.

See Also

OStatement OCatalogStatement UFileStatement OOracleCatalogStatement OConnection OEnvironment OResourceManager

 

Public Methods of Class OConnectionSet

#

Inline

Pure Virtual

Virtual

Method

Description

1

No

No

No

OConnectionSet()

Constructor

2

No

No

No

OConnectionSet(ODBCMessages* messages)

Constructor

3

No

No

No

ps_int32 oConnect(HENV henv, HDBC hdbc)

Connect to the ODBC Data Source

4

No

No

No

ps_int32 oConnect(const ps_char* dsn, const ps_char* username = NULL, const ps_char* password = NULL, const ps_char* application_name = NULL, const ps_char* server_name = NULL, const ps_char* other_connection_attributes = NULL)

Connect to the ODBC Data Source

5

No

No

No

ps_int32 oDisconnect()

Stop all Queries and Disconnect from the Data Source

6

No

No

No

ps_int32 oDoesConnectionExist() const

Does Your ODBC OConnection Exist?

7

No

No

No

ps_int32 oDoesEnvironmentExist() const

Does your ODBC Environment Exist?

8

No

No

No

ps_int32 oDoesStatementExist(ps_int32 index) const

Does a Statement Exist?

9

No

No

No

ps_int32 oForceDBBrand(ps_int32 db_brand = DB_BRAND_UNKNOWN)

Force the Brand of Database

10

Yes

No

No

OCatalogStatement & oGetCatalogStatement() const

 

11

Yes

No

No

OCatalogStatement * oGetCatalogStatementPtr() const

 

12

Yes

No

No

Mutex * oGetConnectMutex() const

 

13

No

No

No

ps_int8 oGetConnectedSw() const

Are You Connected to ODBC Data Source?

14

Yes

No

No

OConnection & oGetConnection() const

 

15

Yes

No

No

OConnection * oGetConnectionPtr() const

 

16

Yes

No

No

ps_int32 oGetConnectionType() const

 

17

No

No

No

ps_int32 oGetDSN(ps_char* dsn) const

Get the Name of ODBC Data Source

18

Yes

No

No

ps_int32 oGetDeadlockWaitTimeBetweenRetries() const

 

19

Yes

No

No

OEnvironment & oGetEnvironment() const

 

20

Yes

No

No

OEnvironment * oGetEnvironmentPtr() const

 

21

Yes

No

No

Messages * oGetMessages() const

 

22

Yes

No

No

ps_int32 oGetNumberOfDeadlockRetries() const

 

23

No

No

No

ps_int32 oGetNumberOfODBCErrors() const

Get the Total Number Errors Detected for all Objects in the OConnectionSet

24

Yes

No

No

ps_int32 oGetPacketSize() const

 

25

No

No

No

ps_int32 oGetQuotedIdentifier(ps_char* quoted_identifer) const

Get the Quoted Identifier the ODBC Connection

26

Yes

No

No

ps_int8 oGetQuotedIdentifiersSw() const

 

27

Yes

No

No

OStatement & oGetStatement(ps_int32 index) const

 

28

Yes

No

No

OStatement * oGetStatementPtr(ps_int32 index) const

 

29

Yes

No

No

ps_int32 oGetStatementType() const

 

30

Yes

No

No

UFile * oGetUFile() const

 

31

No

No

No

ps_time oGetUTTimeConnected() const

Get the UTC Time When You Opened the ODBC Connection

32

Yes

No

No

ps_int8 oGetUseTimeoutsSw() const

 

33

Yes

No

No

ps_void * oGetUserData() const

 

34

No

No

No

ps_int32 oSetConnectMutex(Mutex* connect_mutex = NULL)

Set the Connection Mutex Lock

35

No

No

No

ps_int32 oSetConnectionType(ps_int32 connection_type = ODBC_NORMAL_CONNECTION_TYPE)

Set the Type Connection the OConnectionSet Creates

36

No

No

No

ps_int32 oSetDeadlockWaitTimeBetweenRetries(ps_int32 number_of_microseconds = ODBC_OSTMT_DEADLOCK_WAIT_TIME)

Set Wait Time Before Resending a SQL Command After Deadlocked

37

No

No

No

ps_int32 oSetMessages(ODBCMessages* messages = NULL)

Set the ODBCMessages Object for the OConnectionSet and all its Created Objects

38

No

No

No

ps_int32 oSetNumberOfDeadlockRetries(ps_int32 number_of_retries = ODBC_OSTMT_DEADLOCK_RETRIES)

Set the Number of Times This Class Resends a SQL Command Upon Receiving a Deadlock Victim Error

39

No

No

No

ps_int32 oSetNumberOfStatements(ps_int32 number_of_statements_for_future_connections = 1)

Set the Number of ODBC Statements the OConnectionSet Creates

40

No

No

No

ps_int32 oSetPacketSize(ps_int32 packet_size_in_bytes)

Set the Network Communication Packet Size (Bytes)

41

No

No

No

ps_int32 oSetQuotedIdentifiersSw(ps_int8 sw = 1)

 

42

No

No

No

ps_int32 oSetStatementType(ps_int32 statement_type = ODBC_NORMAL_STATEMENT_TYPE)

 

43

No

No

No

ps_int32 oSetUFile(UFile* os_file)

Set the UFile for the OConnectionSet

44

No

No

No

ps_int32 oSetUserData(ps_void* user_data)

Set User Data on a OConnectionSet

45

No

No

No

ps_int32 oUseTimeouts(ps_int8 use_timeouts_sw = 1, ps_int32 login_timeout_seconds = ODBC_OCONN_LOGIN_TIMEOUT, ps_int32 query_timeout_seconds = ODBC_OSTMT_QUERY_TIMEOUT)

Turn On/Off Timeout Ability

46

No

No

No

~OConnectionSet()

Destructor

 

Protected Methods of Class OConnectionSet

#

Inline

Pure Virtual

Virtual

Method

Description

1

No

No

No

ps_int32 oCleanUp()

Clean Up the OConnectionSet

 

Private Methods of Class OConnectionSet

#

Inline

Pure Virtual

Virtual

Method

Description

 

Go to DBPowerSuite 7.9 Application Programming Interface.


Updated: Thu Jun 18 21:13:23 2009