PDA

View Full Version : Help



Angelie
08-27-2003, 12:51 AM
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 =)

Peotr
08-27-2003, 02:01 AM
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

nwinn
08-27-2003, 03:51 AM
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.

Elidroth
08-27-2003, 04:46 AM
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.

Daisiee
08-27-2003, 07:17 AM
You can do it in vp its pretty easy. MSDN is your frnd!

Angelie
08-27-2003, 08:51 AM
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.

Talas
08-27-2003, 09:57 AM
SQL & Oracle > all =\

Kattoo Tacit
08-27-2003, 10:11 AM
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.

Angelie
08-27-2003, 10:46 AM
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

nwinn
08-27-2003, 12:28 PM
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...

Daisiee
08-28-2003, 08:41 AM
I took 2 yrs of VB but I hated it and didn't retain a single thing.