Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append from
Message
From
11/06/2001 08:07:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00517666
Message ID:
00517677
Views:
18
>I want to convert a txt-file (comma-delimited) into a table with memofields.
>when I enter the command:
>APPEND FROM 'advisor.txt' TYPE DELIMITED WITH ,
>he answers me:
>No fields found to process.
>
>What do I wrong?
>
>regards

Werner,
Append from doesn't work for memo fields. Probably you had no fields other than memo or gen type in your table.

There are workarounds. One work around is to save memo content per field to files and 'append memo memofieldname from filename'. Other is more easy in cases :
Clear all
Use myAllMemoTable
lcStr = filetostr('myText.txt')
Do while len(lcStr)>0
  lcLine = left(lcStr,at(chr(13),lcStr)-1)
  Append blank
  GetMemos(lcLine)
  lcStr = substr(lcStr,at(chr(13),lcStr)+1)
  If asc(lcStr)=10
    lcStr=substr(lcStr,2)
  Endif
Enddo


Function GetMemos
Lparameters tcStr
Local lnElemCount, lnArrayElem
lnElemCount = occurs(",",tcStr)+1
Local aArray[lnElemCount]
lnArrayElem = 1
Do while occurs(",",tcStr)>0
  aArray[lnArrayElem] = alltrim(substr(tcStr,1, at(",",tcStr)-1))
  lnArrayElem = lnArrayElem + 1
  tcStr = substr(tcStr, at(",",tcStr)+1)
Enddo
aArray[lnArrayElem] = alltrim(substr(tcStr,1))
Gather from aArray memo
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform