company logo

ODABAClient :: OpenDataSource - Open data source

The data source to be opened must be defined in the ini-file for the application or in the data catalog. When the data source has been opened successfully the function returns a pointer to a database object handle. The application is responsible to destroy the database object handle, when it is not being used anymore by calling delete or the CloseDataSource() function.

The access mode (accept) can be passed to reduce the access rights defined in the data source (typically from write to read). You cannot increase the access rights (e.g. from read to write).

Return value:  Database object handle ( DBObjectHandle & )

The database object handle refers to a database object, a database or a dictionary.

Implementation details

DBObjectHandle ODABAClient  :: OpenDataSource ( NString &datasource_name, PIACC accopt )
  • datasource_name - Name of the data source

    The name of the data source defines the section in the ini-file or as an entry in the data catalog that contains external data source definitions.

  • accopt - Access mode