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...
Equivalent for BDE property DatabaseName and TSession component
Re: Equivalent for BDE property DatabaseName and TSession component
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.
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.