Subject | RE: [IBO] StoredProc Error |
---|---|
Author | Gary Kind |
Post date | 2002-03-15T15:44:43Z |
Hi,
Please ignore this post, I figured it out, I had the IB_Transaction set to
my data
source (where I am just doing a select from) rather than my data target
where I will
be executing the proc. all fine now!
Thanks
Gary
-----Original Message-----
From: Gary Kind [mailto:garykind@...]
Sent: 15 March 2002 14:41
To: IBObjects@yahoogroups.com
Subject: [IBO] StoredProc Error
Hi
I have just started using IBObjects and have a problem running a stored
proc.
I have a proc defined in the database as so
create procedure nextidaddress
returns (NEXTID integer)
as
begin
NextID = GEN_ID(AddressGen, 1);
suspend;
exit;
end
which runs fine. Im trying to call it through code by issuing -
FStoredProc.IB_Connection := FDataTarget;
FStoredProc.StoredProcName := AProcName;
FStoredProc.ParamNames.Clear;
FStoredProc.Prepare;
FStoredProc.ExecProc;
Result := FStoredProc.FieldByName('NEXTID').AsInteger;
FStoredProc.Unprepare;
FStoredProc.IB_Transaction.Commit;
But when I do I keep getting 'Invalid Transaction handle (expecting explicit
transaction start)' at the Prepare statement which I thought was because I
havent issued an FStoreProc.StartTransaction, even if I add this line of
code
I still get the error. Can anyone help?
Many Thanks
Gary
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Please ignore this post, I figured it out, I had the IB_Transaction set to
my data
source (where I am just doing a select from) rather than my data target
where I will
be executing the proc. all fine now!
Thanks
Gary
-----Original Message-----
From: Gary Kind [mailto:garykind@...]
Sent: 15 March 2002 14:41
To: IBObjects@yahoogroups.com
Subject: [IBO] StoredProc Error
Hi
I have just started using IBObjects and have a problem running a stored
proc.
I have a proc defined in the database as so
create procedure nextidaddress
returns (NEXTID integer)
as
begin
NextID = GEN_ID(AddressGen, 1);
suspend;
exit;
end
which runs fine. Im trying to call it through code by issuing -
FStoredProc.IB_Connection := FDataTarget;
FStoredProc.StoredProcName := AProcName;
FStoredProc.ParamNames.Clear;
FStoredProc.Prepare;
FStoredProc.ExecProc;
Result := FStoredProc.FieldByName('NEXTID').AsInteger;
FStoredProc.Unprepare;
FStoredProc.IB_Transaction.Commit;
But when I do I keep getting 'Invalid Transaction handle (expecting explicit
transaction start)' at the Prepare statement which I thought was because I
havent issued an FStoreProc.StartTransaction, even if I add this line of
code
I still get the error. Can anyone help?
Many Thanks
Gary
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/