Page 1 of 1

Class TIBCArray already exists

Posted: Fri 12 Dec 2008 10:36
by Roaster2
Hi,

I'm using the latest IBDac in a project which uses a plugin system (from Jedi project).
The main application includes a datamodule which carries TIBCConnection and TIBCQuery (the uses clause includes IBC) and does not uses packages.

This main app loads (via the Jedi plugin system) a package file on startup which also includes a datamodule with many TIBCQueries. Of course the uses clause of the datamodules need IBC, too.

When loading this plugin I get this error: 'A class named TIBCArrayField already exists.' and the loading terminates.

I guess this is due to the fact that the main application and the plugin package include the IBC unit which both try to register this class.

How should I go on to get rid of this error. Can I change the coding in IBC.pas to first check if the class TIBCArrayField has been registered already or can you suggest an alternate solution?

cu,
Michael

Posted: Fri 12 Dec 2008 10:41
by Roaster2
Posted too fast ;-)

I've now added the package ibdac100.bpl (using Turbo Delphi) to the package list of the main application and now this works.

I guess there isn't a better solution to get rid of this class error, correct?

Michael

Posted: Wed 17 Dec 2008 08:39
by Plash
Probably the initialization section of IBC unit is executed twice. This is a critical error, and IBDAC should not work in this case.

So, I think you should use your solution to avoid the error.