Modify Import DBI file source
Is there DE8.5 DataEase Import file spec modify function that can update the import source file on an existing DBI file?
In DE 6.53 there is a set of CDF's from Lawrence Fox which includes a WizModifyImport function that does this.
Unfortunately this CDF function does not work with DE8.5 DBI format.
Re:Modify Import DBI file source
The reason the CDF's from 6.x doesn't work is because the format was changed not in 8 but in 7 for some reason that nobody alive can answer.
It was changed from the standard binary file structure that has been DataEase since DFD 1.0 to XML.
In many ways an inspired idea if it had been systemic but it is just DBI that it was done to.
The bonus of this is of course that you can produce your own DBI files and then import data with them.
You can obviously read the file in and replace the file name but I guess the easiest is simply to generate the entire file via a MemoExecDQL() or another file writing approach.
<?xml version="1.0"?>
<Import>
<TableName>$DeStat_RecInfo$</TableName>
<DataFileName>c:\blat\mytest.txt</DataFileName>
<SourceTDFName/>
<ImportFileFormat>9</ImportFileFormat>
<DataOrder>1</DataOrder>
<RecordSeparator>13</RecordSeparator>
<ColumnSeparator>126</ColumnSeparator>
<RecordMatch>4</RecordMatch>
<BatchData>0</BatchData>
<AutoInsertDecimal>0</AutoInsertDecimal>
<IsSourceAscii>1</IsSourceAscii>
</Import>
Re:Re:Modify Import DBI file source
The data source file has a proprietary format which cannot be changed. All that changes is the name of the file.
If there is no 8.5 alternative for WizmodifyImport then i suppose the only option is to use a single DBI definition with a static source file name and rename the source file to that name before import.