Reading a text file makes MDB file huge

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sajith (sajkumar_at_yahoo.com)
Date: 07/15/04


Date: 15 Jul 2004 07:11:15 -0700

I am using VB 6, ADO 2.1 and Access 2000 database.

I have a text file with about 50,000 records which are to be entered
into a database. The text

file cannot be exported directly to Access database as I have to do
some error checking on each

line. I am doing the following code for this (pseudo code)

rs1 is a an ADODB.Recordset

'Routine for opening file
do while not eof(filenumber)
   read line
  call ErrorCheck
   rs1.addnew
  rs1.fields("Field1")=data1
  rs1.fields("Field2")=data2
  rs1.update
  rs1.updatebatch
loop
rs1.close

The problem is, the MDB file gets huge after this number of
iterations. Am I doing anything

wrong here? Any help will be greatly appreciated.

Sajith



Relevant Pages

  • Send data from Access to another app using VBA & COM
    ... this from a VBA script in Excel that transfers data from spreadsheet cells ... The following is the code from my Excel VBA script with some pseudo code ... Dim quoteServer As Object ... ' pseudo code: select the database ...
    (microsoft.public.access.modulesdaovba)
  • Re: Reading a text file makes MDB file huge
    ... file cannot be exported directly to Access database as I have to do ... I am doing the following code for this (pseudo code) ... the MDB file gets huge after this number of ... iterations. ...
    (microsoft.public.vb.database.ado)
  • Re: Help with Pseudo code
    ... > i am looking for some assistance with some pseudo code for a simple ... > I need to write a small program in pseudo code that checks a username ... > and password against records in a database. ... // Verify Username & Password ...
    (comp.programming)
  • Help with Pseudo code
    ... this is my first attempt at coding so i may not be saying ... I need to write a small program in pseudo code that checks a username ... and password against records in a database. ...
    (comp.programming)
  • Re: DAO Vs ADO
    ... I find that DAO connects much faster then ADO when I connect to MS Access ... database. ... which is faster DAO o ADO?(in connection and iterations) ...
    (microsoft.public.vb.general.discussion)