I have an existing document management app (large) that uses MySql.
We are likely to get a client in the near future that would prefer to use MS Sql - in principle the conversion is straightforward - no stored procedures, just a need to swap the data access elements (most of which are in a DataModule). However I dont really want two separate apps - what strategy might I be able to use make the data provider a configuration option in a single application?
Strategy
Which components does the original application use? What database is used in the original application?
If you want to migrate from BDE to MyDAC you can use MyDAC Migration wizard, that helps you to make the main work and swaps BDE components to MyDAC.
If you want to start a new application and access to 2 different databases you can use MyDAC, SDAC, ODAC simultaneously in your project. They have common DAC layer with base classes. You can use DbxOda, DbxMda, DbxSda dbExpress drivers for this purpose too.
If you want to migrate from BDE to MyDAC you can use MyDAC Migration wizard, that helps you to make the main work and swaps BDE components to MyDAC.
If you want to start a new application and access to 2 different databases you can use MyDAC, SDAC, ODAC simultaneously in your project. They have common DAC layer with base classes. You can use DbxOda, DbxMda, DbxSda dbExpress drivers for this purpose too.
Last edited by Paul on Tue 16 Aug 2005 09:25, edited 1 time in total.
Please use compatible versions of MyDAC and SDAC. You can work with TMyQuery and TMSQuery using its base class TCustomDADataSet as described in the following code.
CustomDADataSet.SQL.Text := '...';
CustomDADataSet.Params[...]...;
CustomDADataSet.Open; //CustomDADataSet.Execute;
CustomDADataSet.FieldByName(....)....;
Of course there will be some code that is specific for each database. You can work with Session and SQL command components similarly.
CustomDADataSet.SQL.Text := '...';
CustomDADataSet.Params[...]...;
CustomDADataSet.Open; //CustomDADataSet.Execute;
CustomDADataSet.FieldByName(....)....;
Of course there will be some code that is specific for each database. You can work with Session and SQL command components similarly.