Re: Reading a text file makes MDB file huge

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

From: Paul Clement (UseAdddressAtEndofMessage_at_swspectrum.com)
Date: 07/15/04

  • Next message: David Cawkwell: "Re: Transactions and recordsets query timeouts"
    Date: Thu, 15 Jul 2004 12:11:58 -0500
    
    

    On 15 Jul 2004 07:11:15 -0700, sajkumar@yahoo.com (Sajith) wrote:

    ¤ 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.

    I would try removing UpdateBatch.

    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)


  • Next message: David Cawkwell: "Re: Transactions and recordsets query timeouts"

    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: 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)
    • Reading a text file makes MDB file huge
      ... ADO 2.1 and Access 2000 database. ... I am doing the following code for this (pseudo code) ... iterations. ...
      (microsoft.public.vb.database.ado)
    • Re: QRe: Legacy Access 2 VB 4 app, Word 11 merge on XP Pro SP2 client
      ... selecting "blank database" or some such. ... possible to set a simple password on a whole mdb file, ... case, make sure you have a backup of the .mdw file, then launch Access ... >I could not get the app to accept the changes to Notepad within the ...
      (microsoft.public.access.conversion)