Bug with package

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
eml79
Posts: 13
Joined: Thu 28 Jun 2007 09:20

Bug with package

Post by eml79 » Mon 01 Oct 2007 13:16

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]

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

Post by Plash » Thu 04 Oct 2007 07:38

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.

eml79
Posts: 13
Joined: Thu 28 Jun 2007 09:20

Post by eml79 » Thu 04 Oct 2007 10:55

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

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

Post by Plash » Mon 08 Oct 2007 10:19

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.

eml79
Posts: 13
Joined: Thu 28 Jun 2007 09:20

Post by eml79 » Mon 08 Oct 2007 11:58

I send examle by mail to odac*crlab*com and support*crlab*com

Post Reply