Cursors again

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Matteo
Posts: 9
Joined: Wed 07 Jun 2006 14:16
Location: Trieste

Cursors again

Post by Matteo » Thu 22 Jun 2006 10:09

Why executing a stored and fetching data to a dataset (Brani) with the following code

Code: Select all

OraSQL.ParamByName('p_id_bersaglio').AsInteger := IdTarget;
OraSQL.ParamByName('p_modalita').AsString     := Modalita;
OraSQL.ParamByName('p_data').DataType := ftCursor;
OraSQL.Execute;
Brani.Cursor := OraSQL.ParamByName('p_data').AsCursor;
works fine, instead using

Code: Select all

OraSQL.Params.CreateParam(ftInteger, 'p_id_bersaglio', ptInput).AsInteger := IdTarget;
OraSQL.Params.CreateParam(ftString, 'p_modalita', ptInput).AsString := Modalita;
OraSQL.Params.CreateParam(ftCursor, 'p_data', ptOutput);
OraSQL.Execute;
Brani.Cursor := OraSQL.ParamByName('p_data').AsCursor;
it gives me "Cursor must be opened" exception??

Thanks in advance,
Last edited by Matteo on Thu 22 Jun 2006 12:17, edited 1 time in total.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Thu 22 Jun 2006 12:17

Did you call Brani.Open method?

Matteo
Posts: 9
Joined: Wed 07 Jun 2006 14:16
Location: Trieste

Post by Matteo » Thu 22 Jun 2006 13:29

the row

Brani.Cursor := OraSQL.ParamByName('p_data').AsCursor;

raised the exception.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 23 Jun 2006 12:29

We couldn't reproduce this error. Please send to ODAC support address complete sample that demonstrates this problem and include script to create server objects.

Post Reply