Maybe this code can help you to understand situation with import.
dsQueryNaDBF is Data Source
sSqlUpitNaDBF is string
DBRecRead is int
DBRecCount is int
IF fFileExist (CompleteDir (EDT_Directory) + "BANKE.DBF") THEN
HCreation (BANKE)
DBRecRead = 0
PROGBAR_ImportDBF = DBRecRead
HDBOpen ("BANK", "BANK", CompleteDir (EDT_Directory) + "BANKE.DBF")
DBRecCount = HNbRec ("BANK")
PROGBAR_ImportDBF..MinValue = 0
PROGBAR_ImportDBF..MaxValue = DBRecCount
sSqlUpitNaDBF = "SELECT * FROM BANK ORDER by BAN_SIF Asc"
IF NOT HExecuteSQLQuery (dsQueryNaDBF, hQueryDefault, sSqlUpitNaDBF) THEN
ErrorInfo (errFullDetails)
END
FOR EACH dsQueryNaDBF
DBRecRead + = 1
PROGBAR_ImportDBF = DBRecRead
IF HState (dsQueryNaDBF, hCurrentRecNum) = hStateCrossed THEN CONTINUE
HReset (BANKE)
BANKE.Banka_Sifra = nBroj
BANKE.Banka_Naziv = Upper (OemToAnsi (NoCharacter (NoSpace (dsQueryNaDBF.banka1), "*")))
BANKE.Ziro_Racun = dsQueryNaDBF.ziro1
BANKE.Adresa_Banke = dsQueryNaDBF.adresa
BANKE.Mjesto_Banke = dsQueryNaDBF.mjesto
BANKE.Sifra_Sloga_Za_Prenos = val (dsQueryNaDBF.slog_sif)
BANKE.Sifra_Korisnika_Za_Prenos = dsQueryNaDBF.kor_sif
BANKE.Poziv_na_Broj = dsQueryNaDBF.poziv
HAdd (BANKE)
END
PROGBAR_ImportDBF = DBRecCount
HClose ("BANK")
END
If dbf name is same as FIC in your analisys then you can change Alias name, (See this code)
HDBOpen ("BANK", "BANK", CompleteDir (EDT_Directory) + "BANKE.DBF")
if not, then you can:
HDBOpen ("BANKE", "BANKE", CompleteDir (EDT_Directory) + "BANKE.DBF")
Regards !
-
Bonjour tout le monde ! Veillez consulter la Politique de forum pour comprendre nos règles, Merci a vous !Rejeter la notice
AIDE Fichier xBASE (*.dbf)
Discussion dans 'Windev' créé par dzhabib13, Mai 31, 2020.
merci .
desoler je sui
Maybe this code can help you to understand situation with import.
dsQueryNaDBF is Data Source
sSqlUpitNaDBF is string
DBRecRead is int
DBRecCount is int
IF fFileExist (CompleteDir (EDT_Directory) + "BANKE.DBF") THEN
HCreation (BANKE)
DBRecRead = 0
PROGBAR_ImportDBF = DBRecRead
HDBOpen ("BANK", "BANK", CompleteDir (EDT_Directory) + "BANKE.DBF")
DBRecCount = HNbRec ("BANK")
PROGBAR_ImportDBF..MinValue = 0
PROGBAR_ImportDBF..MaxValue = DBRecCount
sSqlUpitNaDBF = "SELECT * FROM BANK ORDER by BAN_SIF Asc"
IF NOT HExecuteSQLQuery (dsQueryNaDBF, hQueryDefault, sSqlUpitNaDBF) THEN
ErrorInfo (errFullDetails)
END
FOR EACH dsQueryNaDBF
DBRecRead + = 1
PROGBAR_ImportDBF = DBRecRead
IF HState (dsQueryNaDBF, hCurrentRecNum) = hStateCrossed THEN CONTINUE
HReset (BANKE)
BANKE.Banka_Sifra = nBroj
BANKE.Banka_Naziv = Upper (OemToAnsi (NoCharacter (NoSpace (dsQueryNaDBF.banka1), "*")))
BANKE.Ziro_Racun = dsQueryNaDBF.ziro1
BANKE.Adresa_Banke = dsQueryNaDBF.adresa
BANKE.Mjesto_Banke = dsQueryNaDBF.mjesto
BANKE.Sifra_Sloga_Za_Prenos = val (dsQueryNaDBF.slog_sif)
BANKE.Sifra_Korisnika_Za_Prenos = dsQueryNaDBF.kor_sif
BANKE.Poziv_na_Broj = dsQueryNaDBF.poziv
HAdd (BANKE)
END
PROGBAR_ImportDBF = DBRecCount
HClose ("BANK")
END
If dbf name is same as FIC in your analisys then you can change Alias name, (See this code)
HDBOpen ("BANK", "BANK", CompleteDir (EDT_Directory) + "BANKE.DBF")
if not, then you can:
HDBOpen ("BANKE", "BANKE", CompleteDir (EDT_Directory) + "BANKE.DBF")
Regards !Cliquez pour agrandir...

Remove CDX , NTX or other index files from directory where are your DBF files. Don't import DBFs into analisys.
Just copy into some folder and point EDT_Folder there.
yassine.ch apprécie ceci.