Equivalent for BDE property DatabaseName and TSession component

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gavin
Posts: 1
Joined: Wed 04 Jul 2018 12:51

Equivalent for BDE property DatabaseName and TSession component

Post by gavin » Wed 04 Jul 2018 14:54

Dear all,

at the moment we are investigating the possibilities by which we can replace the BDE component in our application. One option is the UniDAC component. We already downloaded the trial version for Delphi 7.

The following circumstances are given:

[*] We have an "Main Form" with the <TForm>.FormStyle = fsMDIForm. In this Form we have our <TDatabase> and the <TDatabase>.DatabaseName is set.
[*] All other forms has the <TForm>.FormStyle = fsMDIChild
[*] If we have an <TTable> or an <TQuery> on the MDI child form, we only have to assign the DatabaseName to establish the connection for the <TTable> or <TQuery>

Until yet, i didn't found out how i have to do this with the UniDAC components. Has some one an example for me?

Furthermore the BDE had the session singleton with the possiblity to look up for existing connections. Is there a similar component in UniDAC components?

Any help is appreciated...

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Equivalent for BDE property DatabaseName and TSession component

Post by azyk » Thu 05 Jul 2018 09:16

In UniDAC, there is a tool for migrating from BDE components to UniDAC components - Migration Wizard. To migrate a project from BDE to UNiDAC, in the Delphi 7 main menu go to UniDAC->Migration Wizard and then follow the wizard prompts. More about Migration Wizard in our online documentation: https://www.devart.com/unidac/docs/migration_wizard.htm .

You can find a sample of using UniDAC in our UniDACDemo project. It is located in the folder "Demos\UniDacDemo\" relatively to the path where UniDAC demo projects were installed.

In UniDAC, there is no component similar to TSession. If you use TSession in a multi-threaded application to provide thread safety, then in UniDAC, you should use a separate instance of TUniConnection connection for each thread. For this, you can create a separate TUniConnection component for each thread and pass your TUniConnection component to each thread. Alternatively, in each thread, you can create a separate instance of TUniConnection in runtime.

Post Reply