RAD Studio for Microsoft .NET |  |

BDP Migration Overview
Borland.Data.Provider Migration | Borland.Data.Common Migration | Borland.Data.Schema Migration | See Also
Collapse All

BDP (Borland Data Provider) is being deprecated, and you should not use BDP for new development. Instead, you should use AdoDbx Client. This topic describes differences and equivalencies between BDP and AdoDbx Client.

As a result of the deprecation of BDP:

- BDP will be removed from the product in a future release.
- There will be no further BDP development and minimal QA effort. Only critical bugs will be fixed.
- No additional documentation will be provided, though documentation is not yet removed.

BDP was based on ADO.NET 1.1. Many of the differentiating features of BDP, such as provider independence and extended metadata, were added to ADO.NET 2 using different approaches, incompatible with BDP. In addition, ADO.NET 2 uses abstract base classes and deprecated the ADO.NET 1.1 interfaces. This made extending BDP to ADO.NET 2.0 impractical.

AdoDbx Client is based on ADO.NET 2.0 and is intended to provide most of BDP's capabilities.

BDP consists of three namespaces:

BDP Namespaces

BDP Namespace | Description
Borland.Data.Common | Contains objects common to all BDP.NET, including Error and Exceptions classes, data type enumerations, provider options, and Interfaces for building your own Command, Connection, and Cursor classes.
Borland.Data.Provider | Contains the main BDP.NET classes such as BdpCommand, BdpConnection, BdpDataAdapter, BdpDataReader, and others that provide the means to interact with external data sources, such as Oracle, DB2, Interbase, and MS SQL Server databases.
Borland.Data.Schema | Contains Interfaces for building your own database schema manipulation classes, as well as a number of types and enumerators that define metadata.

This document describes migration for each of these namespaces.

Borland.Data.Provider Migration

Two classes in this namespace provide data remoting and have not been deprecated, so they do not require migration:

- DataHub
- DataSync

Corresponding classes in BDP and AdoDbx Client

Most BDP classes in this namespace are implementations of ADO.NET classes. These classes are also implemented in AdoDbx Client. Most source code using these classes should convert to AdoDbx Client with little effort.

The following table shows the correspondence between classes in ADO.NET, BDP and AdoDbx Client:

Correspondence between classes in ADO.NET, BDP and AdoDbx Client

ADO.NET | BDP.NET | AdoDbx Client
DbCommand | BdpCommand | TAdoDbxCommand
DbCommandBuilder | BdpCommandBuilder | TAdoDbxCommandBuilder
DbConnection | BdpConnection | TAdoDbxConnection
DbDataAdapter | BdpDataAdapter | TAdoDbxDataAdapter
DbDataReader | BdpDataReader | TAdoDbxDataReader
DbTransaction | BdpTransaction | TAdoDbxTransaction

Conversion of BDP classes in this group is fairly straightforward. Check the documentation to see if the method you've used is supported in the corresponding AdoDbx Client class. If it is, you probably don't need to do anything. If the method is not supported, then you need to modify your code to use methods that are supported in either AdoDbx Client or ADO.NET itself.

For example, the class BdpDataReader accesses database records. Most of its data access methods have corresponding TAdoDbxDataReader methods, as described in the ISQLCursor section. BdpDataReader.GetSchemaTable can be used to retrieve cursor metadata as a DataTable. See the ISQLExtendedMetaData and ISQLMetaData section for a description of metadata access for AdoDbx Client.

BDP Classes Without Corresponding AdoDbx Client Classes

The BdpCopyTable class does not have a corresponding class in AdoDbx Client, so this capability is not available in AdoDbx Client.

Borland.Data.Common Migration

This namespace has seven classes and three interfaces.

BdpConnectionString

The TAdoDbxConnection class has a ConnectionString property. This class also supports connection pooling.

BdpError and BdpErrorCollection

All errors are handled as exceptions in AdoDbx Client in TAdoDbxException, so these classes are not needed.

BdpException, BdpParameter and BdpParameterCollection

These classes are implementations of ADO.NET classes. These classes are also implemented in AdoDbx Client. Most source code using these classes should convert to AdoDbx Client with little effort.

Conversion of BDP classes in this group is fairly straightforward. Check the documentation to see if the method you've used is supported in the corresponding AdoDbx Client class. If it is, you probably don't need to do anything. If the method is not supported, then you need to modify your code to use methods that are supported in either AdoDbx Client or ADO.NET itself.

The following table shows the correspondence between classes in ADO.NET, BDP and AdoDbx Client:

correspondence between classes in ADO.NET, BDP and AdoDbx Client

ADO.NET | BDP.NET | AdoDbx Client
DbException | BdpException | TAdoDbxException
DbParameter | BdpParameter | TAdoDbxParameter
DbParameterCollection | BdpParameterCollection | TAdoDbxParameterCollection

DbResolver

DbResolver is an implementation of the ISQLResolver interface in the Borland.Data.Schema namespace, described later in this topic.

ISQLCommand, IAQLConnection and ISQLCursor

These interfaces are mainly used by driver writers and there is no AdoDbx Client equivalent. You should rewrite the driver using the dbExpress framework.

Borland.Data.Schema Migration

This namespace contains five interfaces.

ISQLDataSource

The GetProviders method returns a list of data providers. A similar capability is provided by TAdoDbxProviderFactory.CreateDataSourceEnumerator, which creates an enumerator for all providers. There is no analog for the methods GetConnections or GetDbObjectTypes in AdoDbx Client.

ISQLExtendedMetaData and ISQLMetaData

Use the GetSchema method in TAdoDbxConnection to get a metadata collection. The Name parameter of GetSchema specifies the kind of metadata to get. The standard names supported by DbConnection.GetSchema are supported in AdoDbx Client.

In addition, you can specify one of the name constants in TDBXMetaDataCollectionName to get a particular metadata collection. You would then use the corresponding class in the DBXMetaDataNames namespace to get the column information you want for that metadata collection.

For instance, to get procedure source code in a database, use the constant ProcedureSources to get a DataTable with procedure source information. Use the DBXMetaDataNames classes TDBXProcedureSourcesColumns and TDBXProcedureSourcesIndex with the returned DataTable to access the procedure source information by name or ordinal.

ISQLResolver

This class resolves SQL commands.

The closest analog is the TAdoDbxDataAdapter class for ISQLResolver methods. This table shows the properties that correspond to methods.

ISQLResolver-TAdoDbxDataAdapter correspondence

ISQLResolver | TAdoDbxDataAdapter
GetDeleteSQL method | DeleteCommand property
GetInsertSQL method | InsertCommand property
GetSelectSQL | SelectCommand property
GetUpdateSQL | UpdateCommand property

For ISQLResolver properties, the closest analog are properties that TAdoDbxCommandBuilder inherits from the ADO.NET class DbCommandBuilder and a TAdoDbxDataReader property.

ISQLResolver-AdoDbx Client correspondence

ISQLResolver | AdoDbx Client
QuotePrefix property | TAdoDbxCommandBuilder.QuotePrefix property
QuoteSuffix property | TAdoDbxCommandBuilder.QuoteSuffix property
Row property | TAdoDbxDataReader.Item property

ISQLSchemaCreate

This interface allows you to create a database schema in your own provider. The AdoDbx Client does not provide this capability.

See Also

ADO.NET Overview

.NET Framework Developer's Guide ADO.NET (MSDN)

TAdoDbxCommand

TAdoDbxCommandBuilder

TAdoDbxConnection

TAdoDbxDataAdapter

TAdoDbxDataReader

TAdoDbxException

TAdoDbxParameter

TAdoDbxParameterCollection

TAdoDbxProviderFactory

TAdoDbxTransaction

TDBXMetaDataCollectionName

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!