|
-
Feb 16th, 2006, 12:41 AM
#1
Thread Starter
New Member
Add Row Number to Text File
I'm have a hard time with VB and try to use SQL to do the things I need to do. I'm stuck on this one and need a row number added to a text file. I found this code searching the internet, and think it will work. The problem I have is I can't get it working in VB. I'm getting it needs a subMain error. I'm not sure where (how) the file is named. Should this have a button?
Here is an example of what I'm trying to accomplish.
I have an ascii file that has records of varying length:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbb
ccccccccccccccccccccccccccccccccccccccccc
dddddddddddddddddddddd
eeeeeee
fff
ggggggggggggggggggggggggggggggggggggggggggggggggg
I need to add a leading sequence number to these transactions, with padded zeros. So the output will look like this:
000001aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
000002bbbbbbbbbbbbbbbbbbb
000003ccccccccccccccccccccccccccccccccccccccccc
000004dddddddddddddddddddddd
000005eeeeeee
000006fff
000007ggggggggggggggggggggggggggggggggggggggggggggggggg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|