TOraQuery in XE4

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lrauti
Posts: 18
Joined: Fri 03 Jan 2014 16:22

TOraQuery in XE4

Post by lrauti » Fri 03 Jan 2014 16:28

Downloaded and installed latest Delphi XE4 version 9.2.5.

Double clicking the TOraQuery component or clicking its SQL property is giving the following error message:

"Property LeftOffset does not exist."

This seems to cause some serious problems in run-time. I must downgrade to the version 9.1.4 (which is sadly having some other bugs). :(

lrauti
Posts: 18
Joined: Fri 03 Jan 2014 16:22

Re: TOraQuery in XE4

Post by lrauti » Fri 03 Jan 2014 18:28

I made a clean install of XE4 and ODAC version 9.2.5. Now it works! Sorry, my bad.

lrauti
Posts: 18
Joined: Fri 03 Jan 2014 16:22

Re: TOraQuery in XE4

Post by lrauti » Fri 03 Jan 2014 21:27

But there still seems to be a serious problem with the TOraQuery component - it doesn't get any data. If I create the TOraQuery dynamically at run-time it works but exactly same component added on the form doesn't. I did downgrade to version 9.1.4 and now everything works again (except some minor bugs which whom I can live with). I don't have time to investigate this any further, I hope that someone has.

Moehre
Posts: 42
Joined: Fri 11 Nov 2005 11:37

Re: TOraQuery in XE4

Post by Moehre » Wed 08 Jan 2014 09:45

Same behaviour in XE5! Please release a bugfix asap!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraQuery in XE4

Post by AlexP » Thu 09 Jan 2014 10:09

Hello,

We cannot reproduce the problem. Please specify the exact versions of your Oracle client and server, as well as the script for creating the table and the query itself

Moehre
Posts: 42
Joined: Fri 11 Nov 2005 11:37

Re: TOraQuery in XE4

Post by Moehre » Thu 09 Jan 2014 11:58

I can reproduce the error building a simple test app on an Oracle Database Version 11.1.0.7.0:

1. Build Table TEST

CREATE TABLE TEST (
NLS_ID NUMBER(5) NOT NULL,
SKZ VARCHAR2(3) NOT NULL,
CONSTRAINT PK_TEST
PRIMARY KEY (NLS_ID,SKZ),
NLSTEXT VARCHAR2(255) NOT NULL);

2. Insert test data

insert into test values (10100,'D','Test1');
insert into test values (10110,'D','Test2');
insert into test values (10120,'D','Test3');

3. Create new Delphi XE5 VCL project:

Put following on the form: TOraSession, TOraQuery, TMemo, TButton

Set TOraSession.LoginPrompt to "True"
Add "OdacVCL" to the uses clause
Put following code to the TButton1.Click event:

procedure Form1.TButton1Click(Sender: TObject);
var
i: integer;
begin
OraSession1.Connected := true;

OraQuery1.CLose;
OraQuery1.SQL.Text := 'SELECT NLSTEXT FROM TEST';
OraQuery1.SQL.Add('WHERE SKZ = :skz');
OraQuery1.SQL.Add('AND NLS_ID = :nlsid');
try
OraQuery1.Prepare;
except
ShowMessage('ERROR during PREPARE');
exit;
end;

for i := 10100 to 10199 do
begin
OraQuery1.Close;
OraQuery1.Params[0].AsWideString := 'D';
OraQuery1.Params[1].AsInteger := i;
try
OraQuery1.Open;
except
ShowMessage('ERROR during SELECT');
exit;
end;
Memo1.Lines.Add(IntToStr(i) + ': ' + OraQuery1.Fields[0].AsWideString);
end;

Start the program, enter the connection data und push the Button.
The 1st time I started the app it runs without errors but all string data was empty, the 2nd and further attempts I get the error "ORA-01480" (even if I restart XE5 ?!)

The error occurs in line 13547 of Data.DB unit:

Result := (GetRecord(GetBuffer(FRecordCount), GetMode, True) = grOK);

Hope this helps ...

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraQuery in XE4

Post by AlexP » Thu 09 Jan 2014 14:11

Hello,

Thank you for the information, we have reproduced the problem and will try to fix it as soon as possible.

Post Reply