Subject RE: [IBO] Using DataPump
Author Riho-Rene Ellermaa
Are you using Cursors or Querys for Source and Dest in Pump


Riho-Rene Ellermaa
senior programmer


-----Original Message-----
From: nibler@... [mailto:nibler@...]
Sent: Tuesday, June 03, 2003 2:41 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] Using DataPump




Riho-Rene,

> I use TIB_Datapump for transfering data between databases.
> I would like to change some data during pumping before storing it. Is it possible?

Yes.
HereĀ“s an example to convert nulls to zero (if numeric)
or to '' if anything else.


procedure TfrmADataPump.DataPumpAfterFetchRow(ARow: TIB_Row);
var
dest :TIB_Row;
i :integer;

begin
dest := DataPump.DstRow;
for i := 0 to dest.ColumnCount -1 do begin
if dest.Columns[i].IsNull then begin
if dest.Columns[i].IsNumeric then begin
dest.Columns[i].Value := 0
end
else begin
dest.Columns[i].Value := ''
end
end
end
end;


Harald


Yahoo! Groups Sponsor
<http://rd.yahoo.com/M=251812.3170658.4537139.1261774/D=egroupweb/S=1705007183:HM/A=1564416/R=0/SIG=11ti81skc/*http://www.netflix.com/Default?mqso=60164797&partid=3170658>
<http://us.adserver.yahoo.com/l?M=251812.3170658.4537139.1261774/D=egroupmail/S=:HM/A=1564416/rand=238501640>

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .




[Non-text portions of this message have been removed]