About the OLE DB interface
You can access a wide variety of data via OLE DB data providers
in PowerBuilder. This section describes what you need to know to use
OLE DB connections to access your data in PowerBuilder.
Supported OLE DB data providers For a complete list of the OLE DB data providers supplied
with PowerBuilder and the data they access, see “Supported Database
Interfaces” in online Help.
What is OLE DB?
The OLE DB API
OLE DB is a standard application programming interface (API)
developed by Microsoft. It is a component of Microsoft’s
Data Access Components software. OLE DB allows an application to
access a variety of data for which OLE DB data providers exist.
It provides an application with uniform access to data stored in
diverse formats, such as indexed-sequential files like Btrieve, personal
databases like Microsoft Paradox, productivity tools such as spreadsheets
and electronic mail, as well as SQL-based DBMSs.
The initial release of the OLE DB interface supports direct
connections to SQL-based databases as well as connections to non-SQL-based
data. To support connections to non-SQL-based data, PowerBuilder includes INTERSOLV’s
DataDirect Reflector. Reflector is a SQL query processor designed
as an OLE DB service provider that provides full SQL-based processing
for non-SQL data.
Accessing data via OLE DB
Applications that provide an OLE DB interface (like PowerBuilder)
can access data for which an OLE DB data provider exists. An OLE
DB data provider is a dynamic link library (DLL) that
implements OLE DB function calls. The application invokes the OLE
DB data provider to access a particular data source.
The PowerBuilder OLE DB interface can connect to any OLE DB
data provider that supports the following OLE DB object interfaces
(an OLE DB data provider must support these interfaces in order
to adhere to the Microsoft OLE DB 2.0 specification):
IAccessor | IDBInitialize |
IColumnsInfo | IDBProperties |
ICommand | IOpenRowset |
ICommandProperties | IRowset |
ICommandText | IRowsetInfo |
IDBCreateSession | ISourcesRowset |
In addition to the required OLE DB interfaces, PowerBuilder also
uses the following OLE DB interfaces to provide further functionality:
OLE DB interface | Use in PowerBuilder |
---|---|
ICommandPrepare | Preparing commands and retrieving column information |
IDBCreateCommand | Accessing data |
IDBInfo | Querying the data provider for its properties. If this interface is not supported, database connections may fail |
IDBSchemaRowset | Getting table lists and index information |
IErrorInfo | Providing error information |
IErrorRecords | Providing error information |
IIndexDefinition | Creating indexes for the extended attribute system tables. Also creating indexes in the Database painter. If this interface is not supported, PowerBuilder looks for index definition syntax in the pbodb70.ini file |
IRowsetChange | Populating the extended attribute system tables when they are created. Also updating blobs |
IRowsetUpdate | Creating the extended attribute system tables |
ISQLErrorInfo | Providing error information |
ISupportErrorInfo | Providing error information |
ITableDefinition | Creating the extended attribute system tables. Also creating tables in the Database painter. If this interface is not supported, PowerBuilder looks for table definition syntax in the pbodb70.ini file |
ITransactionLocal | Supporting transactions. If this interface is not supported, PowerBuilder defaults to AutoCommit mode |
For up-to-date information As connectivity to data via additional OLE DB data providers
is supported in future releases of PowerBuilder, updated information
will be available on the Sybase website. You should also check the Release
Notes
for the latest information about supported OLE
DB data providers for your version of PowerBuilder.
Components of an OLE DB connection
When you access an OLE DB data provider in PowerBuilder, your
connection goes through several layers before reaching the data
provider. It is important to understand that each layer represents
a separate component of the connection, and that each component
may come from a different vendor.
Because OLE DB is a standard API, PowerBuilder uses the same
interface to access every OLE DB data provider. As long as an OLE
DB data provider supports the object interfaces required by PowerBuilder, PowerBuilder can access
it through the OLE DB interface.
The following diagram shows the general components of a OLE
DB connection.
Obtaining OLE DB data providers
There are two ways you can obtain OLE DB data providers for
use with PowerBuilder:
- From Sybase (recommended) Install one or more of the OLE DB data providers shipped with PowerBuilder.
You can do this when you first install PowerBuilder or later. Using
an OLE DB data provider supplied by Sybase ensures that the driver
was tested and found to work with PowerBuilder. - From another vendor PowerBuilder Enterprise and PowerBuilder Professional let you
access data with any
OLE DB data provider obtained from
a vendor other than Sybase if that data provider supports the OLE
DB object interfaces required by PowerBuilder. In most cases, these
drivers will work with PowerBuilder. However, Sybase may not have
tested the drivers to verify this.
PowerBuilder Desktop PowerBuilder Desktop does not
support
the OLE DB interface.
Supported versions and platforms for OLE DB
Versions
The OLE DB interface uses a DLL named PBOLE70.DLL to access
a database via an OLE DB data provider.
Required OLE DB version To use the OLE DB interface to access an OLE DB database,
you must connect via an OLE DB data provider that supports OLE DB
Version 2.0 or higher.
For information on OLE DB specifications,
see Microsoft’s Universal Data Access website
.
Platforms
The OLE DB interface is available on Windows 95/98
and Windows NT.