Assertion failure DBAccess.pas

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lior
Posts: 36
Joined: Mon 01 Aug 2011 07:11

Assertion failure DBAccess.pas

Post by lior » Tue 21 Dec 2021 10:31

Hello,
A user of my program is getting frequently an error since he got a new version of the program and oracle 19.
"Assertion failure (D:\DelphiComp\ODAC\Source\DBAccess.pas (Line 8507)"
Line 8057 is Assert(IsClass(FieldDesc, TCRFieldDesc));
Do you have a suggestion where this error come from ?
Old version was made with Delphi 7 + ODAC 8.0.2 and connected to Oracle Database 11g Enterprise 11.2.0.1.0 - 64bit.
New vewrsion is made with Delphi 10.3.3 Win64 + ODAC 11.3.2 and connect to Oracle Database 19c Enterprise 19.3.0.0.0.
Code is very simmilar.
Thanks in advance

lior
Posts: 36
Joined: Mon 01 Aug 2011 07:11

Re: Assertion failure DBAccess.pas

Post by lior » Sun 26 Dec 2021 08:31

I found a response in https://stackoverflow.com/questions/154 ... access-pas
regarding MyDac in CRFunctions unit:
begin
if IsLibrary then
Result := IsClassByName(Obj, AClass)
else
//------------------------------------
// Danny MacNevin : October 3,2013
// commented out the below line to fix an Assertion Error
// using the TMyConnection in a dll file.
// It was being called from the DBAccess.pas file at line: 7251
// To put this file back to normal, remove the line I added, and
// uncomment the line below...
//------------------------------------
//Result := Obj is AClass;
Result := IsClassByName(Obj, AClass) //Line replaced by Danny
end;

In ODAC I found the equivalent code in CRFunctions:
initialization
if not Assigned(IsClass) then
if IsLibrary then
IsClass := GetIsClassByName
else
IsClass := GetIsClass;

Should a change be made there like in MyDac?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Assertion failure DBAccess.pas

Post by MaximG » Thu 30 Dec 2021 11:49

Thank you for the information. DBAccess.pas is a common module for all DAC products (including for MyDAC and ODAC). Therefore, to find out the reasons, we need an example that reproduces the problem you described. For your convenience, please use the e-support form https://www.devart.com/company/contactform.html We will try to help resolve the issue as soon as possible.

Post Reply