In Oracle objects are created:
Code: Select all
create or replace
type FoundESNRecord AS OBJECT (
ID_ESNI INTEGER,
VData varchar2(2000))
create or replace
type FoundESNIdTable AS TABLE OF FoundESNRecord
In handler events OnClick of object TButton the code contains:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var IndexRecord,
IndexArray: integer;
begin
TempQuery.Close;
TempQuery.SQL.Text := 'Select * ' +
'From table( cast( :p_FoundESNIdTable as FoundESNIdTable ))';
TempQuery.ParamByName( 'p_FoundESNIdTable' ).AsArray.AllocObject(TempQuery.Session.OCISvcCtx, 'FoundESNIdTable');
with TempQuery.ParamByName( 'p_FoundESNIdTable' ).AsArray do
begin
for IndexRecord := 1 to 10 do
begin
IndexArray := AppendItem;
ItemAsObject[IndexArray].AttrAsLargeInt[ 'ID_ESNI' ] := IndexRecord;
end;
end;
TempQuery.Open;
ShowMessage('RecordCount: ' + inttostr(TempQuery.RecordCount) );
end;
" RecordCount: 0 ".
At the subsequent - RecordCount: 10 (as well as should be).
It is a bug or I do something incorrectly?
It is shown up for versions ODAC 6.50.0.35 and 6.50.0.36.
Best regards.
Michael.