Importing a Text Document into Access programitically

pts.
Tags:
C
VB.NET
VBScript
Visual Basic
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Dpalmer
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following