ich habe ein Problem, bei dem ich nicht weiter komme.
Das Programm soll eine csv in eine dbf einlesen. Es funktioniert auch so.
Nur, wenn ich danach eine 2. csv mit dem gleichen Programmcode in eine 2. dbf einlesen will, kommt ein Betriebssystemfehler beim use ... .
Also einmal Input1.txt -> File1.dbf danach Input2.txt -> File2.dbf.
Hat jemand eine Idee?
LG Martin
Code: Alles auswählen
aStructure := { {"F1", "C", 4, 0}, {"F2", "C", 4, 0}, {"F3", "C", 4, 0}, {"F4", "C", 1, 0} }
select 1
DbCreate("File1", aStructure, "DBFDBE")
use File1
select 2
DbeSetDefault("DELDBE")
DbeInfo(COMPONENT_DATA, DELDBE_FIELD_TOKEN, ";")
DbeInfo(COMPONENT_DATA, DELDBE_FIELD_TYPES, "CCCC")
use ("Input1.txt") ALIAS inp VIA ("DELDBE") // Zeile mit dem Fehler beim 2. Aufruf
go top
do while .not. inp->(eof())
select 1
append blank
select 2
replace File1->F1 with field->field1
replace File1->F2 with field->field2
replace File1->F3 with field->field3
replace File1->F4 with field->field4
SKIP
enddo
use
DbCloseArea()
use
DbCloseArea()
close all