Database file reading - BIG HELP

Database file reading - BIG HELP

Post by Darren VanWagening » Tue, 29 Jul 1997 04:00:00



Ok, heres the deal...
I have a text file, and it is separated into fields by the symbol ~. All
I want to do is get a VB DB program to read in this file, and put the
data into a table for use by separating the fields by the ~. Its like
bringing in the file to Excel, and picking separated by ~ selector. But,
I want my program to do this automaticially, so I can proceed to desgin a
database built on this. Please email or post any help. A snipit of code
would be nice :)

--
***************************************************************************
*                        Darren VanWageningen                             *
*                                                                         *

*                                                                         *
*               http://www.tuns.ca/~dvanwage/eternal.html           *
*                                                                         *
*                  FSP: newton.ccs.tuns.ca Port 4303                      *
***************************************************************************

 
 
 

Database file reading - BIG HELP

Post by Glenn Miyashi » Tue, 29 Jul 1997 04:00:00


   Open TextFile For Input As #1
   Line Input #1, Txt

   ' Load array  Tagrec with Individual Elements
   For I = 0 To NumFields
      J = InStr(1, Txt, "~")       ' Find 1st/Next Delimiter
      If J = 0 Then Exit For       ' All Done
      Tagrec(I) = Left(Txt, J - 1) ' Move Element to Array
      Slen = Len(Txt)              ' Length of String
      Txt = Right$(Txt, Slen - J)  ' Remove Leftmost Element
   Next I
   Tagrec(I) = Txt                 ' Last Element

Hope this is of help


>Ok, heres the deal...
>I have a text file, and it is separated into fields by the symbol ~. All
>I want to do is get a VB DB program to read in this file, and put the
>data into a table for use by separating the fields by the ~. Its like
>bringing in the file to Excel, and picking separated by ~ selector. But,
>I want my program to do this automaticially, so I can proceed to desgin a
>database built on this. Please email or post any help. A snipit of code
>would be nice :)
>--
>***************************************************************************
>*                    Darren VanWageningen                             *
>*                                                                     *

>*                                                                     *
>*           http://www.tuns.ca/~dvanwage/eternal.html           *
>*                                                                     *
>*              FSP: newton.ccs.tuns.ca Port 4303                      *
>***************************************************************************



 
 
 

1. Database file reading - BIG HELP

Ok here is the problem. I need to have my application read in a file and
put the data into fields for database work. The file has multiple fields,
all separated by a ~. If anyone can offer any advice or code so I can
read this file in, and then design the database, it would be much
appreciated.Please post or email.

--
***************************************************************************
*                        Darren VanWageningen                             *
*                                                                         *

*                                                                         *
*               http://www.tuns.ca/~dvanwage/eternal.html           *
*                                                                         *
*                  FSP: newton.ccs.tuns.ca Port 4303                      *
***************************************************************************

2. Should I change to MDAC 2.8?

3. How to read bigger files?

4. SQLServer2000, MSDE and ADSI

5. Help Required : Reading Comma delimited files and writing to Access Database

6. Oracle Pipes

7. Help! - Easy question, create file/read file

8. Deleted records in base table appearing in view

9. How big is too big for MS SQL database

10. URGENT - VB creates a big big database in Win98

11. Backing up large databases: How big is big ?

12. How big is a big database on MSDE ?

13. Big Big DAO problems... Please help