Subject | RE: [IBO] IB_Datapump |
---|---|
Author | Jason Wharton |
Post date | 2007-10-30T22:43:49Z |
> I have the following components:I'm guessing your transaction handling is the problem here.
>
> SrcDatabase: TIB_Database;
> DestDatabase: TIB_Database;
> SrcCursor: TIB_Cursor;
> DestDSQL: TIB_DSQL;
> DataPump: TIB_DataPump;
>
> SrcCursor.IBConnection is set to SrcDataBase
> DestDSQL.IBConnection is set to DestDataBase
>
> DataPump.SrcDataSet is set to SrcCursor
> DataPump.DstStatement is set to DestDSQL
>
> SrcCursor SQL added
> SELECT DATETIME, SMSSOURCE,SMSNAME, SMSADDRESS, SMSID,
> SMSREP,SMSDEST, CELLNO, CELLMSG FROM OUTMESSAGES WHERE DATETIME
> >= :FROMDATE AND DATETIME <= :TODATE
>
> DestDSQL SQL added
> INSERT INTO OUTMESSAGES (DATETIME, SMSSOURCE, SMSNAME, SMSADDRESS,
> SMSID, SMSREP,SMSDEST, CELLNO, CELLMSG, IPADDRESS) VALUES
> (:DATETIME, :SMSSOURCE, :SMSNAME, :SMSADDRESS, :SMSID, :SMSREP, :SMSD
> EST, :CELLNO, :CELLMSG, :IPADDRESS)
>
> The only event handling is the DataPump.OnError event that I just
> log to a file.
>
> I have nothing in DstLinks
Use a single TIB_Transaction and assign the connections to it so that you
have a multi-database transaction and set AutoCommit to false OR only call
the datapump Execute method inside a block where you have called
StartTransaction so that you are not getting a soft commit for each record
pumped by the data pump.
HTH,
Jason Wharton