Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gmmastros on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get contents of notepad file? 8

Status
Not open for further replies.

Mandy_crw

Programmer
Jul 23, 2020
581
PH
Hi everyone… i have 1,12,F,U as contents of my notepad, does filetostr() function can get the content in separate value (as separated by coma) not as “1,12,F,U” Thanks and Godbless…
 
Hi Mandy,

it's all okay, you learned more than necessary.

Mandy said:
i wonder and thought of extracting data this time from an editbox
Well, when will you ever have such data entered into an editbox by users? It has to be consistently have 5 values (thus 4 commas).

Such data is usually produced as data export. In VFP, for example you can have a DBF and store all it's content to a text file by
Code:
Copy To filename1.txt type csv
or
Code:
Copy To filename2.txt type delimited

CSV includes a first line with fieldnames, DELIMITED does only output the pure data. The latter is what you had in your file, but where does it come from in an editbox? From a file, usually, then don't take that detour. For a user interface entering data separated by commas and in multiple lines in an editbox is bound to fail by typos and inconsistencies. CSV data is only generated by code, never by people typing it, unless small portions for a sample code, or such things, but it's not a good user interface at all.

Chriss
 
Just to make sure Chriss... Can I not directly put the data from the editbox to my table? as I did appending blank to my table and replace to fieldnames which the only issue is the Dobirth?
 
Yup you can do that

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
Indeed, you know that you can do this, just compare the code you need for it in comparison with an APPEND. APPEND FROM filename works from files only.

Chriss
 
Mandy said:
which the only issue is the Dobirth
What issue do you have? In your own code CTOD works, then APPEND FROM a file also will work using APPEND FROM filename TYPE DELIMITED.


Chriss
 
Ok Chriss.... The application is doing great now... Thank you...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top