Subject | Re: [IBO] More TIB_DataPump questions |
---|---|
Author | mspencewasunavailable |
Post date | 2006-08-16T11:12:11Z |
--- In IBObjects@yahoogroups.com, Lester Caine <lester@...> wrote:
ID, but there are a dozen or so of these tables involved (still
walking them up in the code, actually) and they need to have the
*same* session ID for a given instance of the application. I do
have a generator and a companion SP which allows the app to obtain
this ID when it starts up.
And I really want to know more about TDataPump. I've spent lots of
time over the years doing bulk imports and conversions and would've
been very grateful for such a control.
>it,
> mspencewasunavailable wrote:
>
> > This query is constant. Although I don't prepare it and reuse
> > and making a new SQL string each time is not really a big deal,I
> > could see that it might be in other situations. The results ofthe
> > query go to a temporary table for additional processing, so Iwanted
> > to add a unique, per-instance number in a new column when Ipumped
> > the data into the table. It seemed to me to be a more elegantjust
> > solution to introduce the session ID at that point, since it's
> > there to emulate a temp. table.for
> >
> > If there's no other way, then I'll just produce a new SQL string
> > the query each time, incorporating the session ID, but surelythis
> > is what the DataPump's events are for? Would making a customDPItem
> > class be another way to do this?That'd be ideal if this was the only place I needed a unique session
>
> Then just create a generator and use that in the select
>
> select
> fielda,
> fieldb,
> fieldc,
> ( SELECT GEN_ID(SESID,1) FROM RDB$DATABASE ) as mysessionid
> from blah
> where.....
>
> Just set the generator to your start value.
>
ID, but there are a dozen or so of these tables involved (still
walking them up in the code, actually) and they need to have the
*same* session ID for a given instance of the application. I do
have a generator and a companion SP which allows the app to obtain
this ID when it starts up.
And I really want to know more about TDataPump. I've spent lots of
time over the years doing bulk imports and conversions and would've
been very grateful for such a control.