Roland Wingerter
23-Mar-2006, 04:41 AM
I am trying to import data into an existing table (version 2.3b). The source
file has an identical structure and I created and compiled a program using
the read.flx utility.
However, when I run the resulting program, for each record I get an Error
message "Duplicate records not allowed". This puzzles me, as the new records
are definitely no duplicates. What am I missing?
Please see generated code and table definition below my signature. Note that
the last field is an OVERLAP field. I am not sure wether this should be in
the text file or not. I tried different things, but no luck.
Thanks for any help you can offer.
Roland
/*
clearscreen
string temstr
number recs
direct_input "RD_IXD.TXT"
[seqeof] error 75 "RD_IXD.TXT"
[seqeof] abort
open IXD
repeat
read IXD.WORT
read IXD.DESTYP
read IXD.WST
read IXD.ZGR
read IXD.MERK003
read IXD.FAC
read IXD.SGR
read IXD.SPRA
read IXD.WOA
read IXD.GRM
read IXD.BRP
read IXD.BRA
read IXD.AKZ
read IXD.MERKER
read IXD.EDATUM
read IXD.ADATUM
read IXD.USERNR
read IXD.STATUS
read IXD.FRGB
read IXD.GTNG
read IXD.HOMO
read IXD.ANFANG
readln
[not seqeof] begin
saverecord IXD
clear IXD
show "*"
calc (recs + 1) to recs
end
keycheck begin // Eine Taste wurde gedrckt.
showln // Programm beenden ?
showln "Eine Taste wurde gedrckt, " recs " Datens"tze
gelesen"
show "<ESC> = Ende, beliebige Taste fr WEITER ... "
inkey temstr
[key.escape] abort
showln
showln
end
until [seqeof]
showln
showln recs " Datens"tze eingelesen in IXD."
show "Beliebige Taste fr WEITER ... "
inkey temstr
abort
DATENBANK DEFINITIONEN - Datei-Nr: 5
************************************************** ***
System-Name = ixd
Benutzer-Name = ixd
DataFlex-Name = IXD
************************************************** ***
Datensatzl"nge = 85 (benutzt = 83)
Max. Zahl der S"tze = 16000000 (benutzt = 59142)
Freier Platz wird wiederverwendet
Multi-User RE-READ aktiv
************************************************** ***
FELD FELD FELD FELD DEZ HAUPT VERKNsPFUNG
NUMMER OFFSET LZNGE TYP STE INDEX DATEI FELD
------ ------ ----- ------ --- ----- ----- -----
1 1 50 ASCII 1 0 0 WORT
2 51 1 ASCII 0 0 0 DESTYP
3 52 1 ASCII 0 0 0 WST
4 53 1 ASCII 0 0 0 ZGR
5 54 1 ASCII 0 0 0 MERK003
6 55 1 ASCII 3 0 0 FAC
7 56 3 ASCII 4 0 0 SGR
8 59 2 ASCII 1 0 0 SPRA
9 61 2 ASCII 0 0 0 WOA
10 63 2 ASCII 0 0 0 GRM
11 65 3 ASCII 0 0 0 BRP
12 68 2 ASCII 0 0 0 BRA
13 70 1 ASCII 0 0 0 AKZ
14 71 1 ASCII 2 0 0 MERKER
15 72 3 DATE 0 0 0 EDATUM
16 75 3 DATE 0 0 0 ADATUM
17 78 2 NUMERIC 0 0 0 0 USERNR
18 80 1 ASCII 0 0 0 STATUS
19 81 1 ASCII 0 0 0 FRGB
20 82 1 ASCII 0 0 0 GTNG
21 83 1 NUMERIC 0 1 0 0 HOMO
22 1 5 OVERLAP 1 0 0 ANFANG
Index 1: Feldsegmente: <8> <1> <21>
Index 2: Feldsegmente: <14> <22> <0>
Index 3: Feldsegmente: <8> <6> <22> <0>
Index 4: Feldsegmente: <8> <7> <22> <0>
file has an identical structure and I created and compiled a program using
the read.flx utility.
However, when I run the resulting program, for each record I get an Error
message "Duplicate records not allowed". This puzzles me, as the new records
are definitely no duplicates. What am I missing?
Please see generated code and table definition below my signature. Note that
the last field is an OVERLAP field. I am not sure wether this should be in
the text file or not. I tried different things, but no luck.
Thanks for any help you can offer.
Roland
/*
clearscreen
string temstr
number recs
direct_input "RD_IXD.TXT"
[seqeof] error 75 "RD_IXD.TXT"
[seqeof] abort
open IXD
repeat
read IXD.WORT
read IXD.DESTYP
read IXD.WST
read IXD.ZGR
read IXD.MERK003
read IXD.FAC
read IXD.SGR
read IXD.SPRA
read IXD.WOA
read IXD.GRM
read IXD.BRP
read IXD.BRA
read IXD.AKZ
read IXD.MERKER
read IXD.EDATUM
read IXD.ADATUM
read IXD.USERNR
read IXD.STATUS
read IXD.FRGB
read IXD.GTNG
read IXD.HOMO
read IXD.ANFANG
readln
[not seqeof] begin
saverecord IXD
clear IXD
show "*"
calc (recs + 1) to recs
end
keycheck begin // Eine Taste wurde gedrckt.
showln // Programm beenden ?
showln "Eine Taste wurde gedrckt, " recs " Datens"tze
gelesen"
show "<ESC> = Ende, beliebige Taste fr WEITER ... "
inkey temstr
[key.escape] abort
showln
showln
end
until [seqeof]
showln
showln recs " Datens"tze eingelesen in IXD."
show "Beliebige Taste fr WEITER ... "
inkey temstr
abort
DATENBANK DEFINITIONEN - Datei-Nr: 5
************************************************** ***
System-Name = ixd
Benutzer-Name = ixd
DataFlex-Name = IXD
************************************************** ***
Datensatzl"nge = 85 (benutzt = 83)
Max. Zahl der S"tze = 16000000 (benutzt = 59142)
Freier Platz wird wiederverwendet
Multi-User RE-READ aktiv
************************************************** ***
FELD FELD FELD FELD DEZ HAUPT VERKNsPFUNG
NUMMER OFFSET LZNGE TYP STE INDEX DATEI FELD
------ ------ ----- ------ --- ----- ----- -----
1 1 50 ASCII 1 0 0 WORT
2 51 1 ASCII 0 0 0 DESTYP
3 52 1 ASCII 0 0 0 WST
4 53 1 ASCII 0 0 0 ZGR
5 54 1 ASCII 0 0 0 MERK003
6 55 1 ASCII 3 0 0 FAC
7 56 3 ASCII 4 0 0 SGR
8 59 2 ASCII 1 0 0 SPRA
9 61 2 ASCII 0 0 0 WOA
10 63 2 ASCII 0 0 0 GRM
11 65 3 ASCII 0 0 0 BRP
12 68 2 ASCII 0 0 0 BRA
13 70 1 ASCII 0 0 0 AKZ
14 71 1 ASCII 2 0 0 MERKER
15 72 3 DATE 0 0 0 EDATUM
16 75 3 DATE 0 0 0 ADATUM
17 78 2 NUMERIC 0 0 0 0 USERNR
18 80 1 ASCII 0 0 0 STATUS
19 81 1 ASCII 0 0 0 FRGB
20 82 1 ASCII 0 0 0 GTNG
21 83 1 NUMERIC 0 1 0 0 HOMO
22 1 5 OVERLAP 1 0 0 ANFANG
Index 1: Feldsegmente: <8> <1> <21>
Index 2: Feldsegmente: <14> <22> <0>
Index 3: Feldsegmente: <8> <6> <22> <0>
Index 4: Feldsegmente: <8> <7> <22> <0>