Dear all,
I have a store procedure that reside in DB2 database server called TESTPROC. This procedure will give me two result set of SQL "select" statement. In my code,first recordset successfully dipslayed at my listview component. But when I called SQLStoreProc1.NextRecordSet to get the second result set I have an error message. It tells me that there is an error on EDatabase class (dbExpress error: Operation Not Supported). Does anyone give me a clue how to solve this problem?.
I used the code written below:
procedure TForm1.FormShow(Sender: TObject);
var
ResultSet: TCustomSQLDataSet;
begin
SQLStoredProc1.Active:= true;
ResultSet:= SQLStoredProc1;
{ part where i displayed first result set to listview_1
....
....
}
//don’t free the original!
if ResultSet <> SQLStoredProc1 then
ResultSet.Free;
//in this line, i got the dbExpress error
//get the second result set
ResultSet:= SQLStoredProc1.NextRecordSet; // get next set
end;
Thank you all for any suggestion and comment.
I have a store procedure that reside in DB2 database server called TESTPROC. This procedure will give me two result set of SQL "select" statement. In my code,first recordset successfully dipslayed at my listview component. But when I called SQLStoreProc1.NextRecordSet to get the second result set I have an error message. It tells me that there is an error on EDatabase class (dbExpress error: Operation Not Supported). Does anyone give me a clue how to solve this problem?.
I used the code written below:
procedure TForm1.FormShow(Sender: TObject);
var
ResultSet: TCustomSQLDataSet;
begin
SQLStoredProc1.Active:= true;
ResultSet:= SQLStoredProc1;
{ part where i displayed first result set to listview_1
....
....
}
//don’t free the original!
if ResultSet <> SQLStoredProc1 then
ResultSet.Free;
//in this line, i got the dbExpress error
//get the second result set
ResultSet:= SQLStoredProc1.NextRecordSet; // get next set
end;
Thank you all for any suggestion and comment.