From BDE to UniDAC

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
knochen
Posts: 2
Joined: Thu 05 Nov 2009 11:16

From BDE to UniDAC

Post by knochen » Thu 05 Nov 2009 11:50

Hello,

I'm working on a large database application, which needs to migrated to dbExpress or another system, which doesn't need the BDE. Currently we are working with Delphi 7, but we will migrate to Delphi 2010 within the next two or three months.

I'm not quite sure if UniDAC is the right product for our customers. Some of them have MS SQL Server, some have Oracle and some have Informix. So these are mainly the database which must be supported. Is this possible with UniDAC?
And are there any migration tutorials?

Thank you for any hints.
Werner

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 06 Nov 2009 09:47

UniDAC supports Oracle and Microsoft SQL Server. You can also work with Informix using UniDAC ODBC provider.

There is no migration tutorial. At first you can use Migration Wizard to replace BDE components with UniDAC components on your forms. Then check the components and edit properties manually if required.
UniDAC components have the same program interface as BDE. But some methods or properties may be unavailable. So you need to change manually some places in your code.

knochen
Posts: 2
Joined: Thu 05 Nov 2009 11:16

Post by knochen » Mon 09 Nov 2009 08:17

Thank you for your help.

I have tried the migration wizard by now, but all I get is an errormessage after some time. First I have chosen "Replace BDE components", then selected a source folder incl. subfolders. When I click "finish", the cursor turns into an hourglass. After a waiting period of 4 minutes and 30 seconds a messagebox with an error appears. The message is: "Ungültiger Eigenschaftswert in Zeile 30" which maybe translated to "Invalid property value in line 30".
What can I do to avoid this?

Thanks in advance,
Werner

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 10 Nov 2009 08:53

Try to convert your project by one file or group of files at a time. In such way you can find the form which causes the error. Please send this form to support*devart*com.

rpijnacker
Posts: 9
Joined: Fri 01 Oct 2010 06:50

Post by rpijnacker » Wed 12 Jan 2011 14:07

We recently also converted an big application from BDE to UniDac

Our approach :

Make derived query component that simulates bde properties. This to avoid problems with published dfm properties in dfm files.

In the unit of derived component we made an stringlist that holds an pointer to an UniConnection component. When setting the databasename property of this derived component we make an find routine over the stringlist.

We also made the routine to find the uniconnection global to mimic the behaviour of BDE to use FindDataBase.

After this we where able to make an complete search and replaced over all code (2 mlj lines +) make sure dfm files are stored as text. for this we used grep util of GExperts

We where not able to use the wizard of unidac

This approach took us 1 week to implement and test (1 programmer)
After this taking it in production took like 5 weeks testing.
Main problem where devexpres grids.

After taking it in production we discovered until now 1 big problem
blob fields that where cached by default. So we put it on non cached and
made an seperate read and write transaction to mimic behaiour of BDE

Our experience : don't expect big speed improvements (good written queries and good use of indexes give more speed improvements)

invent
Posts: 92
Joined: Tue 16 Jun 2009 10:59
Location: Bielefeld, Germany

Post by invent » Wed 12 Jan 2011 20:22

Hi,

I think there is no good or bad way to migrate BDE to UniDAC. We changed in the last two years different projects using Delphi 7 and Interbase, Oracle and MS Sql-Server.

rpijnacker, I think you're not right. The UniDAC-Components ar very fast. I made many speed-tests and in most cases Unidac took half of the time than BDE.

The problem is, there is no documentation and the support from Devart is not very good.

The first steps are to replace TDatabase with TUniConnection, TTable with TUniTable, ... That's easy and every deplhi-developer can make this.

When you have a small application with small tables you can use the wizard. Maybe it works.

But you will miss some BDE- / Delphi-functions. There's no TSession, no TIndexdefs, ... When you use these, you need to make some other solutions.

When you have tables with more than 40000 rows your application may be very slow. The reason is that you cannot use some functions like Locate or RecordCount.

The good news: For every problem there is a solution.

At the beginning I thought that I only have to replace some components and than the migration is complete. The truth is, that you have to change your code manually.

But at the end everything is fine: I have an ERP-application with more than 4.000 TUniTable- and more than 8.000 TUniQuery-components. And the data access is very fast.

Werner, if you want to have more information, feel free to write a mail to brinkmann(at)invent.de. We can talk about this (in german) at the telephone.

Kind regards,
Gerd Brinkmann
invent GmbH

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 13 Jan 2011 14:44

hello,

rpijnacker:

To increase the performance you can use the methods described in the Increasing Performancetopic of the UniDAC help.
Also if you have anyspecific questions concerning the performance, youcan post them to our forum or send them by e-mail, and we will try to help you.

Post Reply