Subject | Re: [IBO] TIB_DSQL and Active |
---|---|
Author | Helen Borrie |
Post date | 2006-04-28T16:23:06Z |
At 01:12 AM 29/04/2006, you wrote:
that idea from, certainly not in the help file.
your mistake here is in using an object designed to EXECUTE DML
statements and specifically not to SELECT datasets, an explanation of
why passing blobs around inside stored procedures in variables isn't
pertinent. (It's not a IBO problem, btw, but has to do with how the
database works with blobs...)
or EXECUTE PROCEDURE. And the only kind of procedure that can return
values via a TIB_DSQL is an executable procedure that has return
arguments defined. You can't get *anything* back by calling an
executable procedure with SELECT.
RequestLive. But a select using an IB_Cursor that returns only 0 or
1 row is the leanest way to get that.
from TIB_Statement forward, and see how the highways and byways take
you through the levels of complexity, from TIB_DSQL, which implements
the bare TIB_Statement, through TIB_Cursor, the low-calorie
unbuffered dataset which enables you to fetch one row at a time (call
First, Next, etc. on this, not Open) to TIB_Query, which is the
fully-fledged buffered dataset with bi-directional "moving windows"
on subsets of the full output.
If you haven't already, download the runtime browser for the
helpfile. There are some nice surprises in there for tracking
through the hierarchies.
Helen
> > It doesn't look like a correct usage of an Execute operation to meTIB_DSQL is NOT for SELECT statements. I don't know where you got
> > (though you still didn't provide an example).
>
>I thought I did (in the snippet).
>I realize now you also would like to see the SQL.
>=============
>SELECT IMG_PHOTO
>FROM CASE_PHOTOS
>WHERE PHOTO_ID = :PHOTO_ID -- Key field
>==============
that idea from, certainly not in the help file.
> >Hmm, I think you have a few "missumptions" to unlearn. But since
> > Seriously, if you are somehow passing a key so you can pull over a
> > blob associated with that key, you should use a TIB_Cursor and a
> > SELECT statement. Trying to pass blobs in SP arguments is fraught
> > with problems architecturally.
> >
>Then ,if I may, I would suggest some changes to the help file and FAQ
>to enforce that.
your mistake here is in using an object designed to EXECUTE DML
statements and specifically not to SELECT datasets, an explanation of
why passing blobs around inside stored procedures in variables isn't
pertinent. (It's not a IBO problem, btw, but has to do with how the
database works with blobs...)
>The way I understood my reading of those, if you only need a singleNope. TIB_DSQL is for statements that begin INSERT, UPDATE, DELETE
>row returning a TIB_DSQL is the leanest way to do that.
or EXECUTE PROCEDURE. And the only kind of procedure that can return
values via a TIB_DSQL is an executable procedure that has return
arguments defined. You can't get *anything* back by calling an
executable procedure with SELECT.
>I believe Iread that a TIB_Cursor employs several TIB_DSQLWell, no, it doesn't have to. However, it does if you make the query
>components internally.
RequestLive. But a select using an IB_Cursor that returns only 0 or
1 row is the leanest way to get that.
>I do not recall reading that a TIB_DSQL component should not be usedRead it now: A TIB_DSQL can't be used for a SELECT statement at all.
>for a single row select statement.
>The current code (as per snippet) is working fine; but I take it thatYes indeedy.
>you recommend changing to a TIB_Cursor anyway.
>At least you know I try to do the research first<s>.A useful piece of research would be to track through the hierarchy
from TIB_Statement forward, and see how the highways and byways take
you through the levels of complexity, from TIB_DSQL, which implements
the bare TIB_Statement, through TIB_Cursor, the low-calorie
unbuffered dataset which enables you to fetch one row at a time (call
First, Next, etc. on this, not Open) to TIB_Query, which is the
fully-fledged buffered dataset with bi-directional "moving windows"
on subsets of the full output.
If you haven't already, download the runtime browser for the
helpfile. There are some nice surprises in there for tracking
through the hierarchies.
Helen