Re: Reading a text file makes MDB file huge
From: Paul Clement (UseAdddressAtEndofMessage_at_swspectrum.com)
Date: 07/15/04
- Previous message: Vadim Bulat: "Connection string with sa password"
- In reply to: Sajith: "Reading a text file makes MDB file huge"
- Next in thread: PC: "Re: Reading a text file makes MDB file huge"
- Messages sorted by: [ date ] [ thread ]
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)
- Previous message: Vadim Bulat: "Connection string with sa password"
- In reply to: Sajith: "Reading a text file makes MDB file huge"
- Next in thread: PC: "Re: Reading a text file makes MDB file huge"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|