Board index » delphi » StoredProc: "Error creating cursor handle"

StoredProc: "Error creating cursor handle"

I connected a procedure of Oracle with component StoredProc and when
altering the property Active for True I received the mistake  message "Error
creating cursor handle ". Which the solution of this problem?

Juliano Morona

 

Re:StoredProc: "Error creating cursor handle"


BDE is unable to create a cursor because it needs a cursor to iterate the
table. I believe TStoreProc can only be used to return what ever the stored
procedure returns, and field(s) inside the params property will contain the
returned value(s). Try the folowing steps to see if it helps:

1. If your stored procedure receives any params, you must either set the
value of the params property (Input) in design or run time to contain the
values required by the stored procedure.

2. If your stored procedure returns any values, you should see params
(Output) which will contain the returned values.

3. Somewhere in your code, call the following methods to execute the stored
procedure:

    StoredProc1.Prepare;
    StoredProc.ExecProc;
    Edit1.Text := StoredProc1.ParamsByName('Value').AsString;

    'Value' is the field which you will see when click on the ellipsis of
the TParams property to invoke the params editor. This field will contain
the returned value from the Stored procedure.

Hope this help, have fun.

Quote
Juliano Morona wrote in message <6emj2l$r...@forums.borland.com>...
>I connected a procedure of Oracle with component StoredProc and when
>altering the property Active for True I received the mistake  message
"Error
>creating cursor handle ". Which the solution of this problem?

>Juliano Morona

Re:StoredProc: "Error creating cursor handle"


Propably your stored procedure doesn't return cursor. Try to use the
ExecProc method.

Michal Motalik
mota...@zl.inext.cz

Quote
Juliano Morona wrote in message <6emj2l$r...@forums.borland.com>...
>I connected a procedure of Oracle with component StoredProc and when
>altering the property Active for True I received the mistake  message
"Error
>creating cursor handle ". Which the solution of this problem?

>Juliano Morona

Re:StoredProc: "Error creating cursor handle"


I recieve this error if I forget to supply the StoredProcName
property.

On Tue, 17 Mar 1998 16:45:29 -0300, "Juliano Morona"

Quote
<coop...@engeplus.com.br> wrote:
>I connected a procedure of Oracle with component StoredProc and when
>altering the property Active for True I received the mistake  message "Error
>creating cursor handle ". Which the solution of this problem?

>Juliano Morona

Re:StoredProc: "Error creating cursor handle"


Juliano,

I have gotten this error as well, and have found that the following prevents
the error.

var
    sp:TStoredProc;
begin
    if sp.active then sp.active:=false; // make sure the sp is not active
    sp.unprepare;
    sp.prepare;  //  Leaving this prepare out gives me problems.
    sp.parambyname('<your parameter>').as<whatever>:='<value>';  //  Set
your parameters
    sp.prepare;  //  Prepare the procedure
    sp.active;  //  Activate the procedure
end

There seems to be something funny about the sp in that the prepare before
the params is important, as is the prepare after the params.

I always test to see if my stored proc is already active because I may call
the same stored proc from more than one place.

HTH,
Ken Peck

Quote
Juliano Morona wrote in message <6emj2l$r...@forums.borland.com>...
>I connected a procedure of Oracle with component StoredProc and when
>altering the property Active for True I received the mistake  message
"Error
>creating cursor handle ". Which the solution of this problem?

>Juliano Morona

Other Threads