|
-
Nov 14th, 2000, 01:07 PM
#1
Thread Starter
New Member
I have a current project in which I want to read information from a comma delimited text file into an Access Database through VB6. I am clueless as how to do this or if it is even possible. Is there some way to use the ADO control to do this?
-
Nov 14th, 2000, 03:24 PM
#2
Monday Morning Lunatic
If you read the file line by line, then use Split to get the values for each field. Then get a recordset for the table, and insert the values as required.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 15th, 2000, 09:11 AM
#3
New Member
If the delimited text file needs to be accessed alot and you will continue to use the program to do it, create a data-aware class. It is a bit of work, but once you set it up, you then access the text file as if it is a database and can use the ADO methods on it.
In VB help, search for the following article:
Creating a Data-Aware Class that Reads Records from a Delimited Text File
It leads you step by step. You may not understand all of the steps at first, but include them if they are in the sample code. I have done this and it works fantastic.
TTFN,
Smashing Piggy
"Beware of Big Bad Wolf dressed in Tigger clothes"
-
Nov 29th, 2000, 03:58 AM
#4
Junior Member
hi
i was also looking out for the same kind of thing and while searching for it i got some answers for that
so i m providing u the link where it is kept. If u still have problems then search for "text to database". U will surely get the answer
any way i think these links will be very much helpful to U as they were to me.
http://forums.vb-world.net/showthrea...threadid=40824
http://forums.vb-world.net/showthrea...threadid=40849
the first link has good sample code also.
hope it helps and works
cheers
Vishal
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
|