Access violation with CLOB fields (odac 9.7.27)
Posted: 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:
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.
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. You need an Oracle database with AL32UTF8 character set and a table with at least one CLOB field.
- 2. Create a new VCL Forms Application.
- 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.
- 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!
- 5. Place this code in the main form’s OnShow event:
Code: Select all
procedure TForm1.FormShow(Sender: TObject); begin OraSession1.Connect; OraQuery1.Open; OraQuery1.Edit; OraQuery1.Post; OraQuery1.Close; OraSession1.Disconnect; end;
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.