newprogamer
Programmer
Hello Everyone,
I have a flat file, which is comma deliminted. Each field has double quotes around it. Except for the last field in the file. The last field of the file has no double quotes weather there is text there or not. This causing a Run time error '62' input past end of file. So, I went to the last field and typed empty quotes if there was so text there and typed quotes if there was text there. This solved the problem and I could get the data from the file.
Is there a way to change the data in the file? I need to add double quotes to the last field.
Here is the code:
Open adpattend For Input Access Read Shared As #2
Input #2, Company_Code, Last_Name, First_Name, In_Time, Out_Time, Out_Punch_Type, Hours, Earnings_Code
Here is the data:
"XXX","BROWN","JOE","01/30/2006 05:57:00 AM","01/30/2006 02:00:00 PM","","8",
"XXX","BROWN","JOET","01/31/2006 06:00:00 AM","01/31/2006 02:00:00 PM","","8",VACTON
Please help! Thanks!
New Programmer
I have a flat file, which is comma deliminted. Each field has double quotes around it. Except for the last field in the file. The last field of the file has no double quotes weather there is text there or not. This causing a Run time error '62' input past end of file. So, I went to the last field and typed empty quotes if there was so text there and typed quotes if there was text there. This solved the problem and I could get the data from the file.
Is there a way to change the data in the file? I need to add double quotes to the last field.
Here is the code:
Open adpattend For Input Access Read Shared As #2
Input #2, Company_Code, Last_Name, First_Name, In_Time, Out_Time, Out_Punch_Type, Hours, Earnings_Code
Here is the data:
"XXX","BROWN","JOE","01/30/2006 05:57:00 AM","01/30/2006 02:00:00 PM","","8",
"XXX","BROWN","JOET","01/31/2006 06:00:00 AM","01/31/2006 02:00:00 PM","","8",VACTON
Please help! Thanks!
New Programmer