Page 1 of 1

Access violation with CLOB fields (odac 9.7.27)

Posted: Thu 17 Nov 2016 11:49
by balazs miereisz
Hi Team,

I've found a problem with CLOB fields in Unicode Oracle database which causes access violation when closing a Delphi VCL application. This problem appeared first in ODAC version 9.7.26. You can easily reproduce the AV with these steps:
  1. 1. You need an Oracle database with AL32UTF8 character set and a table with at least one CLOB field.
  1. 2. Create a new VCL Forms Application.
  1. 3. Place a TOraSession component to the main form. Set the ConnectString property, LoginPrompt to False, Options.UnicodeEnvironment to True and Options.UseUnicode to True.
  1. 4. Place a TOraQuery component and connect to the TOraSession. Use the OraQuery Editor to generate the Update SQLs for the table. The CLOB fields should be in the Update Fields!
  1. 5. Place this code in the main form’s OnShow event:
  1. Code: Select all

    procedure TForm1.FormShow(Sender: TObject);
    begin
      OraSession1.Connect;
    
      OraQuery1.Open;
    
      OraQuery1.Edit;
      OraQuery1.Post;
    
      OraQuery1.Close;
    
      OraSession1.Disconnect;
    end;
If you run the application an close it you will get the access violation in unit OraClasses!

if you remove the “OraSession1.Disconnect;” statement from the code there will be no AV when closing the application.

Best regards,

Balázs Miereisz
WINFORM Kft.

Re: Access violation with CLOB fields (odac 9.7.27)

Posted: Wed 23 Nov 2016 11:55
by MaximG
We will investigate the work of ODAC with CLOB fields and inform you about the results as soon as possible

Re: Access violation with CLOB fields (odac 9.7.27)

Posted: Thu 24 Nov 2016 12:30
by MaximG
Thank you for your information. We reproduced the issue and fixed it. Unfortunately, this fix was not included in the latest ODAC 9.7.28 build (21-Nov-2016). As a workaround we can send you a night build. For it provide us your license number and IDE version