parsing text file

Posted on 2012-09-17
Last Modified: 2012-09-17
I am trying to parse a text file.  It will be a single line text file.  The format will be :

11234567890\ Name\ Address

I know about the domcd.transfertext but this isnt what I am looking for.  I also have some coding for parsing, but did not write it.  I have tried to learn about parsing and can not find any helpful links.  I am looking for some guidance on this issue.  The format above will go into an sql db.  The fist set of data will go into field PhoneNumber, the second will go into field Name, the third will go into field Address.  The \ is the delimiter and the space starts a new field.  Any help would be more than appreciated.

Thanks in advance!
Question by:russell12
    LVL 28

    Expert Comment

    One file? Many files is a single folder or folder tree? Any pattern to file name(s)?
    LVL 2

    Author Comment

    There will be many files created.  The file name will be in .txt format with the phone number being the file name.  Example: 1234567890.txt; 1234567891.txt, 1234567892.txt, etc.  They will be located in a single folder called "calls".
    LVL 119

    Accepted Solution

    here is sample code to parse the string and add them as record

    dim str as string, strArr() , rs as dao.recordset

    str="11234567890\ Name\ Address"


    set rs=currentdb.openrecordset("tablename")

    with rs
    end with
    LVL 2

    Author Closing Comment

    Awesome!!  Thanks for putting me on the right track.  I should be able to use the code I do have and incorporate the 2 together to make it read the text file.  Thanks again!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now