Access violation with CLOB fields (odac 9.7.27)

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
balazs miereisz
Posts: 22
Joined: Wed 06 May 2009 14:28

Access violation with CLOB fields (odac 9.7.27)

Post by balazs miereisz » Thu 17 Nov 2016 11:49

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.

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

Re: Access violation with CLOB fields (odac 9.7.27)

Post by MaximG » Wed 23 Nov 2016 11:55

We will investigate the work of ODAC with CLOB fields and inform you about the results as soon as possible

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

Re: Access violation with CLOB fields (odac 9.7.27)

Post by MaximG » Thu 24 Nov 2016 12:30

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

Post Reply