Subject | Re: [IBO] Re: TIBODataset and EXECUTE PROCEDURE with output parameters |
---|---|
Author | Martijn Tonies |
Post date | 2007-10-14T11:47:32Z |
Hello Helen,
going through a place where it tries to fetch the values, but they just come
back as Null for some reason, if this wasn't supposed to work, why would
it do this?
As far as I can tell, a TDataset compatible component wouldn't do anything
with Fields if it's not a resultset.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> > > > This procedure has 1 output parameter. When I prepare, IBO createscan
> > > > a single output parameter.
> > > >
> > > > Next, I use ExecSQL and kinda expect the parameter to hold the
> > > > output value.
> > > >
> > > > However, the parameter value stays Null.
> > >
> > > If however what you realy have is a ESP, you should not use TIBOQuery
> > > but instead use TIBOStoredProc. Fill the StoredProcName property with
> > > the name of your procedure and fill the param property collection.
> > > Call the ExecSQL method and you should have the output parameters
> > > correctly filled.
> >
> >No, I'm using TIBOQuery for a good reason here. Given that IBO fills the
> >parameters property AND it executes without problems, I would expect
> >the output parameters to have a value. When tracing through the code, I
> >see that it attempts to fill the parameter values. But they're null.supposed
> >
> >I'm not asking what I should use, but rather I'm asking if this is
> >to work.TIBOQuery creates parameter entries automatically, and I see the code
>
> I simply don't know whether TIBOQuery is meant to behave like the VCL
> or like native IBO when a bdataset component is used to execute a
> procedure. It's not something I'd consider a sensible thing to do.
>
> If it were a TIB_Query you would not find the output from an
> executable procedure in Params, but in Fields. Have you checked to
> see whether this is the case with TIBOQuery? I'd have to set up a
> test app myself to answer that question...
going through a place where it tries to fetch the values, but they just come
back as Null for some reason, if this wasn't supposed to work, why would
it do this?
As far as I can tell, a TDataset compatible component wouldn't do anything
with Fields if it's not a resultset.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com