Pull records from flat file db into array

Results 1 to 2 of 2

Thread: Pull records from flat file db into array

  1. #1
    Join Date
    Dec 1969

    Default Pull records from flat file db into array

    I have a file that acts as a database. Rather than use some sort of delimiter, it stores it&#039;s data by limiting fields to a certain size. I have determined that each record takes 4161 bytes total, and I can easily view this information through Notepad. I would like to pull some of the information into an array, to be processed. There are something like 256 columns, of which I am concerned with about 10. At each time I only want to process about 50 rows per day max.<BR><BR>Does anyone have any ideas about how to approach this task in a manner that will save computer resources? I&#039;m afraid that pulling every record into an array would be a great drain, especially as the database grows. How can only read certain columns into the array?<BR>

  2. #2
    Join Date
    Dec 1969

    Default Set up a DSN!

    You can use the ODBC (or ODBC32) control panel to create a DSN that refers to this flat file. Really! Using the "MS Text Driver".<BR><BR>You choose a directory, choose the .txt files, choose the correct file, and choose "Fixed Length" as the format (you don&#039;t get to use any of the default options). At that point, you&#039;ll be able to add one field at a time, specifying name, datatype, and length (in characters).<BR><BR>Once you&#039;ve done all that, now you can just use ordinary SQL queries to get to the columns in the DB!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts