How to import a text file to my mdb file using vb5 
Author Message
 How to import a text file to my mdb file using vb5

Hi all,
 I'd like to import a text file into my access mdb. How can I do it
using VB code.
Ron



Mon, 24 Apr 2000 03:00:00 GMT  
 How to import a text file to my mdb file using vb5



Quote:
> Hi all,
>  I'd like to import a text file into my access mdb. How can I do it
> using VB code.
> Ron

Hi Ron,

You will need to use the Basic file commands, but it depends -- is it a
fixed width file or a delimited variable-width file?

If it is a fixed-width file, you will need to define a user-defined type
with the "Type" statement in the declarations section of a code module.
Then you can use the "Open" command to open the file as Random and use the
"Get" command to retrieve data from the file and use DAO objects to put the
data in your database.  Then use "Close" to close the file.

If it is a comma-delimited file, you need to open the file for Input and
use the "Input" statement or the "Line Input" statement to retrieve the
data and also use DAO objects to get the data into the database.

If you can specify which type of file you are using, I can give you more
specific examples.  Unfortunately, there's no easier way from VB.




Mon, 24 Apr 2000 03:00:00 GMT  
 How to import a text file to my mdb file using vb5

Oops wrong address in the last post,
It's
http://www.farther.com/stamey/vbanswernet.asp

Sorry.

Quote:

> Hi all,
>  I'd like to import a text file into my access mdb. How can I do it
> using VB code.
> Ron

--
------------------------
Network Engineer
Datatrace Information Services Company Inc.

http://www.farther.com/stamey
--------------------------------
Bradley's Bromide: "If computers get too powerful, we can organize them
into a
committee; that will do them in."


Wed, 26 Apr 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. import hebrew text files to mdb files, using VB5

2. Text file import - export using VB5.0

3. Import Text (Delimited) File Into Table Using VB5

4. VB5 - Converting a text file to MDB file

5. Acc97 and VB5: Automating the import of DB objects from another mdb file

6. Acc97 and VB5: Automating the import of DB objects from another mdb file

7. Error in Importing a Text File into MDB

8. Importing/Merging Text File (csv) into existing DB (*.mdb)

9. How To Import a Text File into MDB

10. How to import a tab delimited text file into my Access MDB

11. Importing text file to MDB format

12. QUESTION: Importing delimited file into .MDB file.

 

 
Powered by phpBB® Forum Software