0

I have created DELPHI database application which will use DBX TSQLConnection component to connect to Oracle database (19c version). I'm getting access violation error , When i call oracle listagg function (SQLQuery1.open --in this line).

When i debugged , i got the error in below object file,

FileName : Data.DBXDynalink.pas

Function : function TDBXDynalinkReader.DerivedNext: Boolean;

Error Line : DBXResult := FMethodTable.FDBXReader_Next(FReaderHandle);

Actual Error : Access violation at address 04FD6CC2 in module 'dbxora.dll'. Read of address 00000004

Below is my code ,

...SQLQuery1 initialization....

SQLQuery1.CommandText := Trim(memoSQLText.Lines.Text); // Assigning query
SQLQuery1.Open; // Exactly on this line i'm getting error
if SQLQuery1.RecordCount > 0 then

....Do something here....

Note : Same query is executing in other versions which are all below to Oracle version 19C (19.3)

IDE version used for application development : DELPHI XE3 (i have checked with DELPHI 10.1 Berlin also)

DB version : Oracle 19C (19.3)

Steps to reproduce :

// 1.Execute below queries in order to create testing data ,

create table myuserlist(myuser varchar2(10));

Insert into myuserlist(myuser) values('karthik');
Insert into myuserlist(myuser) values('aarush');
Insert into myuserlist(myuser) values('yuvan');

// 2.Try to open the below mentioned query using TSQLConnection and TSQLQuery 

select listagg(a.myuser, ', ') within group (order by a.myuser) as myusernames from myuserlist a

Sample project is available in the GitHub, https://github.com/yuvankarthik/DELPHI-DemoOracleConnect.git

Help me to resolve this issue.

Community
  • 1
  • 1
  • That error indicates you're using an object that has not yet been created. Please post a [mre] that includes all variable definitions, creates the variables, etc., instead of just a few lines out of context. – Ken White Jul 27 '20 at 12:45
  • As I mentioned in my post, I'm getting error when i'm doing query execution (**sql query with listagg function**). You can see that the error is coming from **DBXORA.DLL module** which is Embarcadero dbExpress ORACLE driver related. It's not a problem with my code because same code works well in Oracle versions < 19c. This also i mentioned in this post. I have shared minimal code that produces the same problem , also i have shared complete project in github which reproduces this problem. GitHub link also shared in this post.Kindly have a look at it. – Karthik Thirumoorthi Jul 29 '20 at 07:14
  • If you're convinced that the problem is in EMBT's code, the remedy is to file a bug report with them. As far as your own code, we don't go to an off-site location to get information needed for your question here, which is made clear in the [help] guidelines. What you have posted here does not include a [mre] that demonstrates the issue; you've provided a few out-of-context lines of code. – Ken White Jul 29 '20 at 11:53

0 Answers0