×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Why ADO hangs after 3000 records while inserting or updating ?

Why ADO hangs after 3000 records while inserting or updating ?

Why ADO hangs after 3000 records while inserting or updating ?

(OP)
Hi,

The table has more then 1,000,000 records. The ado hangs for 2 - 5 minutes after update or insert 3000 record. Only option is to move those updated or inserted record, then it runs fast.

Field datatype - Text - length 50
Why does ado hangs after 3000 record with table having more then 1,000,000 records ?

How to update or insert ado without hanging as no response ?


Please advise.

Thanks,

Ken

RE: Why ADO hangs after 3000 records while inserting or updating ?

Could you share the VBA code to represent the issue?
And what do you mean by: "move those updated or inserted record"?


---- Andy

There is a great need for a sarcasm font.

RE: Why ADO hangs after 3000 records while inserting or updating ?

Since you mentioned ADO not sure if below will work since the code I use is for DAO or if this is the same issue.

CODE -->

'This line allows processing more than 9000 records without
    'getting the dreaded "Run-Time error '3052' ;
    'File sharing lock count exceeded. Increase you MAXLocksPerFile Registry Entry"
    'http://www.access-programmers.co.uk/forums/showthread.php?t=185985
    'First link Method 2 from Post #4
    '20150529
    DAO.DBEngine.SetOption dbMaxLocksPerFile, 800000 

RE: Why ADO hangs after 3000 records while inserting or updating ?

I have seen several posts that suggest that working with small chunks of data with SQL server is better than writing one big block for performance... Since ADO is appropriate for SQL it may be ADO that is the issue. This may fall into the category of it is easier to fix than to explain.

Edit: To clarify I mean you would write or commit records very frequently vs. trying to batch load say from a disconnected recordset that you reconnect.

RE: Why ADO hangs after 3000 records while inserting or updating ?

Quote (lameid )

you would write or commit records very frequently

That's why I asked for code.
If it is in the loop, COMMIT every 500 records or so should do the trick.


---- Andy

There is a great need for a sarcasm font.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close