Subject Re: [IBO] using IB_Import with TDataset as source data.
Author Helen Borrie
At 06:09 PM 6/03/2006, you wrote:
>We use IBObjects.
>I would like to use
>either TIB_Import or TIB_Datapump to import
>data from a source which is a TDataset descendant ( TClientdataset )
>
>How can I do this?
>
>I am looking at it and
>
>TIB_Import looks good.
>
>But I want to directly import from my dataset.

TIB_Import reads from an ascii file, not a dataset.

TIB_Datapump retrieves data from an IB or FB database table and
inserts to or updates another IB or FB database table in a
cross-database transaction; and the source dataset needs to be a
TIB_Dataset descendant.

But if you already have a TClientDataset with a provider (presumably
via BDE or CLX) you have what you need. Just create a table to
receive the data from the clientdataset as a variant (use the
FieldByName.Value property of the field you are reading) and assign
it to a parameterised INSERT statement in a TIB_DSQL.

Helen