• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 274
  • Last Modified:

Import Text Files into an Microsoft Access Database

Which data access component can I use to access the content of a delimited text file, in order to use it in the batch move component in the source property?
0
sigalos
Asked:
sigalos
1 Solution
 
CrazyOneCommented:
It depends on what the delimiter is and if it uses end of line like a paragraph break to denote where one record ends an the next one starts. Generally speaking for data in a delimited text file to be moved to an Access database through Delphi the fields in the text file need to be as to what data type of each field is in a schema file. If the a field data type is a text fiels then that field would need in the schema file to be identified to what the lenght of the field is.

Something like this

Width of Field, Decimal Points, Starting cursor position

[CmmssTbl]
Filetype=Fixed
Field1=CopyDUKey,Long Integer,11,00,00
Field2=TravType,Char,01,00,11
Field3=RevType,Char,01,00,12
Field4=Provider,Char,10,00,13
Field5=ShortCode,Char,03,00,23
Field6=DomInt,Char,01,00,26
Field7=Origin,Char,03,00,27
Field8=Destination,Char,03,00,30
Field9=FromDate,TimeStamp,30,00,33
Field10=ThruDate,TimeStamp,30,00,63
Field11=Amount,Float,20,02,93
Field12=OneCap,Long Integer,11,00,113
Field13=RoundCap,Long Integer,11,00,124
Field14=MaxDiscount,Float,20,02,135
Field15=Where,Char,10,00,155
Field16=Class,Char,02,00,165
Field17=FareBasis,Char,08,00,167
Field18=NoCCCo,Char,19,00,175
CharSet=ascii


The Crazy One
0
 
CleanupPingCommented:
sigalos:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
Lukasz LachCommented:
sigalos,
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to CrazyOne http:#7125818

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now