TOraXML issue

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Iasen

TOraXML issue

Post by Iasen » Mon 10 Jan 2005 09:38

I have the follow problem:
1. I'm using TSmartQuery and TOraXML and ODAC 4.50 and Delphi 7.1.
2. The SQL script below has to return 5 records but it return only one.

Where is my mistake or there is some bug in the components?

Thanks in advance,
Iasen Drenski


with SmartQueryXML do
begin
Close;
SQL.Clear;
SQL.Add('select XMLElement("ORD_BANKCODE",t.mt_100_ord_bae) XML ');
SQL.Add('from mt_100_datap t ');
SQL.Add('where rownum<=5');

Open;
i:=SmartQueryXML.Fields.Count;
Memo1.Lines.Text:=TOraXMLField(FieldByName('XML')).AsXML.AsString;
Memo1.Lines.Add('Counted records: '+IntToStr(i));

Close;
end;

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Mon 10 Jan 2005 13:26

SmartQueryXML.Fields.Count returns the number of columns in result set. Please set SmartQueryXML.Options.QueryRecCount=True to use SmartQueryXML.RecordCount instead.

Post Reply