Einzelnen Beitrag anzeigen

alex517

Registriert seit: 23. Nov 2004
Ort: Bernau b. Berlin
273 Beiträge
 
Delphi XE5 Enterprise
 
#2

AW: Fibplus Batch Datenimport Problem

  Alt 28. Jul 2010, 13:54
Hab BatchInput/BatchOutput selbst noch nicht verwendet deshalb nur eine Vermutung.
Das Import-File hat noch die alte Struktur und passt deshalb zum nicht zum neuen Insert-Statement.
Entweder ein zum Import-File passendes Insert-Statement verwenden oder
evtl. oder hilft das weiter:
devguide1.pdf
Zitat:
Batch processing
Delphi-Quellcode:
procedure BatchOutputRawFile(const FileName:string;Version:integer=1);
procedure BatchToQuery(ToQuery:TFIBQuery; Mappings:TStrings);
The Version parameter is responsible for format compatibility with old file versions, created
by FIBPlus BatchOutputXXX method. If Version = 1, FIBPlus uses an old principle of work
with file versions: the external file keeps data ordered by SQL query fields. It is supposed that on
reading data saved by the BatchInputRawFile method, parameters will have the same order in the
reading SQL. The number of TpFIBQuery fields (the source of the data) must coincide to the
number of TpFIBQuery parameters which will read the data. For string fields it is important to
have the same length for the field being written and for the reading parameter whereas their
names can differ.
If Version = 2, FIBPlus uses a new principle of writing data. Besides the data, the file also
keeps system information about fields (name, type and length). On reading the data, it will be
chosen by similar names. The order and number of fields in the writing TpFIBQuery can differ
from those of parameters in the reading TpFIBQuery. Their types and length can also differ.
Only names must coincide.
Alexander
  Mit Zitat antworten Zitat