Help please, it does not work on xbase

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Jose Marte
Posts: 12
Joined: Sun Dec 11, 2016 7:52 am
Location: Republica Dominicana

Help please, it does not work on xbase

#1 Post by Jose Marte »

Please, I need your help, whoever you may be interested in, I have this small code in foxpro to fill a database with from a txt file. What happens to me is that in xbase, I only fill the first field, the other fields do not recognize them, if someone please could tell me or help solve this, thank you.

Close All
Set Safety oFF

Select 0
Use Ponches Exclusive
Zap
Append From C:\PONCHES\Ponches.Txt Type Delimited
Close All

Set Safety On

Quit

User avatar
TWolfe
Posts: 60
Joined: Thu Jan 28, 2010 7:34 am

Re: Help please, it does not work on xbase

#2 Post by TWolfe »

Assuming the .txt file is comma delimited, try:
Append From "C:\PONCHES\Ponches.Txt" DELIMITED

IF the .txt file is fixed length fields, try:
Append From "C:\PONCHES\Ponches.Txt" SDF

The commands "Set Safety oFF" and "Set Safety oN" are not needed

HTH,
Terry

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Help please, it does not work on xbase

#3 Post by Auge_Ohr »

Jose Marte wrote:Append From C:\PONCHES\Ponches.Txt Type Delimited
not sure what FoxPro have default sign for Delimited so look into your *.TXT

guess it is ";" so try

Code: Select all

Append From C:\PONCHES\Ponches.Txt DELIMITED WITH ";"
greetings by OHR
Jimmy

Victorio
Posts: 621
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: Help please, it does not work on xbase

#4 Post by Victorio »

Hi, when I converted my Clipper programs to Xbase, I had problem with append like this :
append from &infuvi DELIMITED with ";"

Now I use this :
SELECT 1
use &fpdbf
nHandle:=DC_TxtOpen(infuvi)
do while !DC_TxtEof(nHandle)
cLine:=DC_TxtLine(nHandle)
IF 1->(DC_AddRec(5))
if len(cLine)>254
replace riadok with substr(cLine,1,254)
replace riadok_ with substr(cLine,255,254)
else
replace riadok with cLine
endif
1->(dbRUnlock())
ENDIF
DC_TxtSkip(nHandle,1)
enddo
* zatvorenie text.súboru
DC_TxtClose(nHandle)

In this example I controlling length of line to 254 characters, but this can disable

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Help please, it does not work on xbase

#5 Post by Eugene Lutsenko »

Jose Marte wrote:Please, I need your help, whoever you may be interested in, I have this small code in foxpro to fill a database with from a txt file. What happens to me is that in xbase, I only fill the first field, the other fields do not recognize them, if someone please could tell me or help solve this, thank you.

Close All
Set Safety oFF

Select 0
Use Ponches Exclusive
Zap
Append From C:\PONCHES\Ponches.Txt Type Delimited
Close All

Set Safety On

Quit
Here is a system that you develop and improve:
http://lc.kubagro.ru/aidos/_Aidos-X.htm
Everything is there: the executable modules, source code, and databases. You might need it for something.

The system has a hierarchical menu screens, use graphics, work with texts, databases, and directly with the files on the signs, work with Internet through http and ftp protocols.

User avatar
Jose Marte
Posts: 12
Joined: Sun Dec 11, 2016 7:52 am
Location: Republica Dominicana

Re: Help please, it does not work on xbase

#6 Post by Jose Marte »

Thanks, thank you very much for all your comments and valuable help, thanks for taking a little of your busy time to answer, I hope to continue counting on your help, since I am starting in the migration to xbase, thank you. :D :handgestures-thumbup:

Post Reply