In MyDAC the interests of BDE application developers were taken into consideration. So starting to use MyDAC after working with BDE would be easy even for developing complex projects. Moreover, MyDAC does not have problems like ones with LiveQuery and compatibility of applications developed using different versions in BDE.
Abandoning BDE gives one more important advantage - positive effect on performance. Instead of complex BDE-ODBC drivers system it uses the fastest access - directly to MySQL server. Also access to MySQL Embedded server is supported.
MyDAC provides special Wizard to simplify the conversion of already existing projects. This Wizard replaces BDE-components in the specified project (dfm-and pas-files) to MyDAC. BDE-components that will be replaced:
- TDatabase -> TMyConnection
- TQuery -> TMyQuery
- TTable -> TMyTable
- TUpdateSQL -> TMyUpdateSQL
To run the Wizard, select BDE Migration Wizard item in MyDAC menu and follow the instructions. BDE Migration Wizard does not support C++Builder.
Note: The Wizard serves only to simplify routine operations and after the conversion project might be uncompiled.
Below is the list of properties and methods which cannot be converted automatically. Here you can find hints for users to simplify manual replacement.
- AliasName - specific BDE property. Not supported by MyDAC
- DatabaseName - has a different meaning in BDE and MyDAC. At MyDAC it means MySQL Server database. See TMyConnection.Database for details
- Locale - see TMyConnection.Options.CharSet
- KeepConnection - not supported by MyDAC
- Params - see TMyConnection properties
- Session, SessionAlias, SessionName - MyDAC does not need global management of a group of database connections in an application. So these properties are not supported
- Temporary - has no sense in MyDAC. Additional connections are created but not available for the user. See TCustomMyDataSet.FetchAll = False for details
- TraceFlags - see TCustomDASQLMonitor.TraceFlags
- TransIsolation - see IsolationLevel
- Execute - use ExecSQL instead of this method
- FlushSchemaCache - not supported by MyDAC
- GetFieldNames - not supported by MyDAC
- IsSQLBased - not supported by MyDAC. For MySQL must be always True
- ApplyUpdates - parameters are not supported. To update only specified DataSets use TMemDataset.ApplyUpdates. Update is performed within a transaction.
- BlockReadSize - see TCustomDADataSet.FetchRows
- CacheBlobs - MySQL Server does not provide service of suspended BLOB loading
- KeySize - specific BDE property. Not supported by MyDAC.
- DefaultIndex - not used in MyDAC. If you need to sort a table by any field see P:Devart.MyDac.TCustomMyTable.OrderFields, TMemDataSet.IndexFieldNames
- Exists, CreateTable, AddIndex, DeleteIndex, StoreDefs, Deletetable, TableType - MyDAC does not allow to create tables by using TTable. If you need to create a table execute 'CREATE TABLE ...' query or use any special third-party tools.
- IndexDefs - not used in MyDAC, but fills on first call
- IndexFieldNames - a list of fields for local sorting. See TMemDataSet.IndexFieldNames
- IndexFieldCount, IndexFields, IndexFiles, IndexName, GetIndexNames, GetIndexInfo - Not supported by MyDAC
- KeyExclusive - not supported by MyDAC. Use SELECT ... FROM .. WHERE ... to get requested result
- KeyFieldCount - not supported by MyDAC, as key fields are not used for searching on the client side
- TableLevel - specific BDE property. Not supported by MyDAC
- ApplyRange, CancelRange, EditRangeStart, EditRangeEnd, SetRange - MyDAC does not support Range
- BatchMove - has no meaning in MySQL. Use INSERT ... INTO ... SELECT syntax to copy records onto server side
- FindKey, FindNearest, GotoCurrent, GotoKey, GotoNearest, EditKey, SetKey - use TMemDataSet.Locate and TMemDataSet.LocateEx
- GetDetailLinkFields - use TCustomDADataSet.DetailFields, TCustomDADataSet.MasterFields
- RenameTable - use 'RENAME TABLE ...' script
- ConstraintCallBack, ConstraintsDisabled, DisableConstraints, EnableConstraints - has no meaning in MySQL
- FlushBuffers - see TMyServerControl.Flush
- Translate - use AnsiToNative and similar functions.
MyDAC does not need global management of a group of database connections in an application.
A complete analogue to TMyUpdateSQL.