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
Assertion failure DBAccess.pas
Re: Assertion failure DBAccess.pas
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?
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?
Re: Assertion failure DBAccess.pas
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.