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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fixed Width Format Files

Status
Not open for further replies.

Dangerous

Programmer
Aug 31, 1999
6
0
0
GB
I am trying to write an application that will convert a fixed width format text file in to an Access Database.<br>
<br>
Every time i attempt to import the data from the text file, i get corruption in the Access Database. I have pinned this down to there being commas in the text file data.<br>
<br>
How do i open a fixed width file containing commas in the data and get VB6.0 to ignore the commas and input the full length of the data?<br>
<br>
If this is impossible then does anyone have ideas as to how i can code around this problem?<br>
<br>
If so then please feel free to email me any coding suggestions to richie@ncnexpress.com<br>

 
Dangerous,<br>
<br>
What version of Access do you use? Reason I ask is that what you want is very much doable, but the methodology changes between versions.<br>
<br>
For instnce, in
 
Use "line input" (I think the keyword is) to read a line of data at a time. You can then manipulate the data.<br>
<br>
Unless you've got a very large amount of data it's often easier to load the data file into a word processor and fiddle that way.<br>
<br>
Another approach - would be my next step I think - is to look at the options in Access for importing data. There are bound to be fixed length options.<br>
<br>
Regards<br>
<br>
Mike<br>
---<br>
Mike_Lacey@Cargill.Com<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top