|
-
Jul 2nd, 2012, 09:06 PM
#1
Thread Starter
Member
creating and populating database from text file
HI, I am a former Delphi (5) programmer migrating my app to VB 2010.
But the terminology is a bit different for VB and I'm having a hard time
translating between the two. Here's a greatly simplified list of what I want
to do:
0. Create the following databases to these specifications:
Database "Topics":
Column 1 - Topic Code (key, char(4))
Column 2 - Topic Description (varchar)
Database "Lots":
Column 1 - LotNumber (key, int)
Column 2 - Topic Code (char(4)) - for lookup in Topics database
Column 3 - Lot Description (varchar)
Metacode to build files:
1. Open text file containing topic data (topics.txt), read and parse to give 2
fields, topic code and description.
2. Read to end of file and write one row in Topics database for each line in topics.txt
3. Open text file containing lots data (lots.txt), read and parse to give 3
fields, lot number, topic code and lot description.
4. Read to end of file and write one row in Lots databsae for each line in
lots.txt. Of course, topic code should match up with the appropriate row in the
Topics database.
I want to do all this in VB code, not with SQL, including checking to see if
the tables are already created, if not then actually creating the tables,
establishing the relation between Topics and Lots and then filling the tables.
There is of course a lot more going on that I haven't mentioned (error checking,
calculations, additional fields, additional tables, etc.) but once I can see
how to do the basics, I'm sure I can figure out the rest.
Any help will be greatly appreciated.
Mike
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
|