Results 1 to 5 of 5

Thread: Copying Large DB-100 rows at time?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    6

    Copying Large DB-100 rows at time?

    Attention wild and crazy developers,
    I am copying a large Access db (15,000 rows+) and I need an idea of loading/copying maybe the first 100 rows, then the next 100, the next 100, etc until EOF. Any ideas. The program currently loads all the rows (small db for now, so no problem) into memory, but obviously this is slow and will not work on large db's. Thanks for your time!
    mcrpds

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    depends on what you are doing with the data... I have queries that select 100,000 records at a time... it is not really slower... the db engine retrieves the records as you go along...

    so what are you going to be doing with the data when you query it? that will give us a better idea of how you should go about it

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    6
    kleinma,
    I am doing a SQL call to pull in from several tables, because I need the patient name,chart number,dob. But I do a Select * into local memory. What I am thinking of is selecting 100 at a time initially then the next 100, etc. After this if the patient info is not duplicated on my base db, then I add the data as new. What do you think?
    mcrpds

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    I don't see any need for pulling only 100 at a time... the cursor will return the records as needed... it doesn't really return the ENTIRE recordset in one lump.. see you make a connection to the database and then open the recordset... now if you are on the first record.. and check the recordcount property of the recordset.. it will be wrong.. because it really has only returned some of the records.. as you move through the recordset it fetches the other records.. that is why you have to do a .movelast to get the actual record count of a recordset

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2002
    Posts
    6
    kleinma,
    The vb app has a class which acts like a detached record set, so when I do a .load method w/ the select * it will actually load the entire view into local memory. I guess I left out this critical part...sorry. I can not modify the class either so I need another alternative other than reading the db directly. Pls advise.
    mcrpds

Posting Permissions

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



Click Here to Expand Forum to Full Width