I'm trying to read a .csv file exported from FileMaker Pro and then write a .txt file. The database contains my high school 50th reunion data and I need to extract that and put it into one paragraph per classmate in the .txt file. I've done this at my other reunions using Line Input # in VB6 and predecessors. Now I'm on an iMac and using KBasic, but there is no Line Input. The code snippet below works for one record but not for more than one.
I don't know OOP from oops, but maybe someone can help with KBasic code to accomplish the same thing. Thanks,
Steve Fisher
srfisher101@gmail.com
OPEN FName FOR INPUT AS #1
DO WHILE NOT EOF(#1)
INPUT #1, _
iCom, iPaid, iDate_Paid, _
iKey, iName, iAddress, iChild, iCity, iEmail, iEpub, iPhone, iPub,
iSpouse, iState, iText, iType, iUD, iYear, iZip
NameAddress = iName & ", " & iAddress & ", " & iCity & ", " & iState & " " & iZip & "."
LOOP
CLOSE #1
TextBox1.Text = "Finished
This code returns:
runtime error: 1 (file) could not be read in line 0
Unknow exception in KBasic runtime (kbrun).