0 pts.
 Importing a Text Document into Access programitically
Hello, here is my problem, I have a text file that looks like this: Group:Tablename Fields:''fieldname""fieldname2""fieldname3" "1""2""3" Group:Tablename2 Fields:''fieldname""fieldname2""fieldname3" "1""2""3" I need to figureout a way to programically create a dba from this file, the file format is unchangeable, and I have been unable to figure out a way to do this, Group: refers to the Table Name Fields: are the actually field names and the last line is the info for the specific colums please help any suggestions would be great Thanks

Software/Hardware used:
ASKED: February 3, 2006  2:44 PM
UPDATED: February 5, 2006  6:33 AM

Answer Wiki:
There is no easy solution to this type of ODD file format but I have encounter it and worse many time. You need to import the file by reading it line by line and translating each record in every line including the header line and programmatically inserting it into a DB. The alternative and possible easiest for you is to write a preprocessing file that reads the file and takes insets either a comma or a tab between each "". I have done this in the past. Then you import as a standard csv,tab delimited file. Somewhere I have code that does both the above. the Code would be VB or VBA and the data base would have been Access. If it will be any further help contact me directly.
Last Wiki Answer Submitted:  February 5, 2006  6:33 am  by  Dpalmer   0 pts.
All Answer Wiki Contributors:  Dpalmer   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

There is no easy solution to this type of ODD file format but I have encounter it and worse many time.

You need to import the file by reading it line by line and translating each record in every line including the header line and programmatically inserting it into a DB.

The alternative and possible easiest for you is to write a preprocessing file that reads the file and takes insets either a comma or a tab between each “”. I have done this in the past.

Then you import as a standard csv,tab delimited file.

Somewhere I have code that does both the above. the Code would be VB or VBA and the data base would have been Access.

If it will be any further help contact me directly.

 0 pts.