Results 1 to 11 of 11

Thread: Help

  1. #1
    Lechon Baboy Angelie's Avatar
    Join Date
    Dec 2001
    Location
    Los Angele, Ca
    Posts
    6,172

    Help

    anyone know how to convert a txt file into a database (using vb pls --- gonna end up using access ... dont laugh pls). Note....the txt file is not columnar format but the data has consistent spacing.


    NAME: PETER LEE HIC: 21111111119A MRN: 1111111

    T-REV HCPS UNIT CHARGES FEE-PRICE ASC
    L0301 ATPO3 1 $44.20 $14.79 ETC

    thanx for anyone who can help.

    if possible...a link to the said dilemma would be helpful too =)
    the truth hurts but it sets you free...

    ................(___)..........
    .................|Oo|...........
    .......... /```` OO).........
    ........./ |____-- .......druids are fine, l2p
    .......*...L......L.............

  2. #2
    OMG! Kittens! Peotr's Avatar
    Join Date
    Oct 2001
    Location
    Moscow, ID
    Posts
    1,263
    Ummm... Off the top of my head, I can't, because I have too many questions bubbling through my head. But if I could see the file, I could do it in about 30 minutes.

    -- Peotr

  3. #3
    Lexi's Better Half nwinn's Avatar
    Join Date
    Jun 2002
    Location
    WA
    Posts
    1,991
    I'd use Python to parse through it and put it into an orderly data structure then you can do whatever you want with the info.

    Python is real simple to pick-up and use on just about any system and it has pretty powerful file and string manipulation functions. You could really use just about any scripting language of your choice... Perl, Ruby, Python, etc.
    ~derasi
    My magelo is gone! :'(

  4. #4
    SBRFL Elidroth's Avatar
    Join Date
    Sep 2001
    Location
    San Diego, CA
    Posts
    2,701
    Doesn't VB have a command to import space delimited data? If everything has a space between values and each record has a set number of fields, it should be a pretty simple import task.
    Elidroth, Overlord Skirt

    Booyakasha!

  5. #5
    NO I AM NOT A CHICK!!!!!!! Daisiee's Avatar
    Join Date
    Nov 2001
    Location
    Union City, OH
    Posts
    659
    You can do it in vp its pretty easy. MSDN is your frnd!

  6. #6
    Lechon Baboy Angelie's Avatar
    Join Date
    Dec 2001
    Location
    Los Angele, Ca
    Posts
    6,172
    i have a program called Monarch which is similar to what derasi was talking about...its just that some of the companies i'll end up contracting with doesnt have that and most of their files / records / reports are situated in access/vb. which is why its important i use vb. thanx very much for the input =D hopefully peotr will come to my rescue so i can start playing eq again. its a 70k page report so ... its not so big but its not so small either.
    the truth hurts but it sets you free...

    ................(___)..........
    .................|Oo|...........
    .......... /```` OO).........
    ........./ |____-- .......druids are fine, l2p
    .......*...L......L.............

  7. #7
    Hoss / EQ & WoW Talas's Avatar
    Join Date
    Mar 2003
    Location
    Los Angeles
    Posts
    1,302
    SQL & Oracle > all =\
    Talas Pennysnatcher

  8. #8
    Fleur-De-Lis Kattoo Tacit's Avatar
    Join Date
    Aug 2001
    Location
    TEXAS
    Posts
    956
    Heh, I got an Access issue I am dealing with myself.... trying to find a way to break into an MDB file to edit some functions and forms without doing a rewrite. The source was lost though. I hate hate hate Access but a one day Access job is better then a 2 week Delphi job.
    Defender Kattoo Tacit protecting your lands since November 2000.

  9. #9
    Lechon Baboy Angelie's Avatar
    Join Date
    Dec 2001
    Location
    Los Angele, Ca
    Posts
    6,172
    Originally posted by Talas
    SQL & Oracle > all =\
    True =D

    But before u can write statements in SQL or Oracle...u still need to work with a database...and to get that...i need to get a function that converts txt data into a db =D
    the truth hurts but it sets you free...

    ................(___)..........
    .................|Oo|...........
    .......... /```` OO).........
    ........./ |____-- .......druids are fine, l2p
    .......*...L......L.............

  10. #10
    Lexi's Better Half nwinn's Avatar
    Join Date
    Jun 2002
    Location
    WA
    Posts
    1,991
    Originally posted by Elidroth
    Doesn't VB have a command to import space delimited data? If everything has a space between values and each record has a set number of fields, it should be a pretty simple import task.
    I think it can look at comma-delimited info, pretty sure, but I've only messed w/ VB a very tiny bit...
    ~derasi
    My magelo is gone! :'(

  11. #11
    NO I AM NOT A CHICK!!!!!!! Daisiee's Avatar
    Join Date
    Nov 2001
    Location
    Union City, OH
    Posts
    659
    I took 2 yrs of VB but I hated it and didn't retain a single thing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •