I sometimes need a static resultset, which means: the server table is queried and subsequent sql operations don't affect that resultset.
In ADO I used Cursortype ctStatic but in Unidac I can't find something like that.
I have to process very large table sizes and if there is a way to do that without copying to a local VirtualTable it would be helpfull. The resultset is ReadOnly and UniDirectional.
static resultset
-
AndreyZ
Hello,
There is no CursorType property in ODAC and UniDAC. But you can use a procedure/function that returns the SYS_REFCURSOR type, for example:
We are considering the possibility of adding the CursorType property in one of the future versions.
There is no CursorType property in ODAC and UniDAC. But you can use a procedure/function that returns the SYS_REFCURSOR type, for example:
Code: Select all
CREATE OR REPLACE
FUNCTION GET_ALL_DATA RETURN SYS_REFCURSOR
AS
CUR SYS_REFCURSOR;
BEGIN
OPEN CUR FOR SELECT * FROM T_TABLE;
RETURN cur;
END;Code: Select all
var
UniQuery: TUniQuery;
begin
UniQuery:= TUniQuery.Create(nil);
UniQuery.Connection:= UniConnection;
UniQuery.SQL.Text := 'begin select get_all_data into :cur from dual; end;';
UniQuery.ParamByName('cur').DataType := ftCursor;
UniQuery.Open;
UniDataSource1.DataSet:=UniQuery;