I have a C Program which writes out a fixed length file.
The file needs to be read by a macro in Microsoft Access which expects the data in fixed starting and ending positions.
However, when I try to import the file from Access, by:
Get External Data...
and then choose the file; the import only loads the first record of a large file.
When I step thru the access wizard, all of my fields match up with the file layout but still I only import one record.
I found one way around this to successfully import the file:
If I save the file as type "PC", then the file imports completely; but my problem is that I need to do this thru code, from C.
Is there any way of achieving this?
I opened the text file in an editor and somehow my program is inserting a blank line between each record.
Am I doing something wrong in the formatting of this file?
Here's the output statement where I write out the file from the C Program:
I do include a carriage return and line feed.
------------------------------------------------
fprintf(output,"%5li%-80s%-80s%-80s%-80s\r\n",
bp12.adds_id, cmnt1, cmnt2, cmnt3, cmnt4);
------------------------------------------------
Maybe my access macro is inserting an extra blank line between each record. How can I turn this off in access?
Can anyone help?
Thanks in Advance
John
The file needs to be read by a macro in Microsoft Access which expects the data in fixed starting and ending positions.
However, when I try to import the file from Access, by:
Get External Data...
and then choose the file; the import only loads the first record of a large file.
When I step thru the access wizard, all of my fields match up with the file layout but still I only import one record.
I found one way around this to successfully import the file:
If I save the file as type "PC", then the file imports completely; but my problem is that I need to do this thru code, from C.
Is there any way of achieving this?
I opened the text file in an editor and somehow my program is inserting a blank line between each record.
Am I doing something wrong in the formatting of this file?
Here's the output statement where I write out the file from the C Program:
I do include a carriage return and line feed.
------------------------------------------------
fprintf(output,"%5li%-80s%-80s%-80s%-80s\r\n",
bp12.adds_id, cmnt1, cmnt2, cmnt3, cmnt4);
------------------------------------------------
Maybe my access macro is inserting an extra blank line between each record. How can I turn this off in access?
Can anyone help?
Thanks in Advance
John