Page 1 of 1

Bug with package

Posted: Mon 01 Oct 2007 13:16
by eml79
odac version 6.10 & 6.20, Delphi 5 Update Pack 1

I use unit OdacVcl in two OCX.
If I compile both OCX without package (vcl50.bpl) all work fine.
If I compile both OCX with package (vcl50.bpl, but without odac50.bpl) - I get error:

Project ... raised exception class EFilerError with message 'A class named TCursorField alredy exists'.

I suggest that error in unit Ora.pas (procedure RegisterFieldClasses).
[You check Delphi variable IsLibrary in order to run register class single. But this variable can be False in OCX compiled with package]

Posted: Thu 04 Oct 2007 07:38
by Plash
We could not reproduce this error. Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

Posted: Thu 04 Oct 2007 10:55
by eml79
Suggest this bag can be Delphi 5 specific

************ TestDll.dpr ********************

library TestDll;
uses Ora;
begin
end.

************ TestExe.dpr ********************

program TestExe;
uses Windows, Ora;
begin
LoadLibrary('TestDll.dll');
end.

*******************************************

In files TestExe.dof and TestDll.dof must be this values

[Directories]
Packages=Vcl50
UsePackages=1

Posted: Mon 08 Oct 2007 10:19
by Plash
This is known problem that the IsLibrary variable is False when a DLL is built with runtime packages.
But we could not reproduce the error 'A class named TCursorField already exists'. Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

Posted: Mon 08 Oct 2007 11:58
by eml79
I send examle by mail to odac*crlab*com and support*crlab*com