Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-Threading in MSAccess

Status
Not open for further replies.

dpimental

Programmer
Jul 23, 2002
535
US
Is there any way to do Multi-Threading in msaccess.

I have Access 2003 and process external databases (number right now is up to 110, ranging in size from 20,000KB to 300,000KB).

It would be great to be able to process 5 or 10 at a time rather than 1 at a time?

Anyone?



David Pimental
(US, Oh)
 
I don't think you can. I'm sure if you can someone here will know how. Having said that, if your processing is processor intensive, threading won't get you much if any return on your investment.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Yes/No; My approach is to open multiple connections to the backend SQL Server database and perform Executes on each seperate connection. I've found that a maximum of 6-8 connections is my limit before performance decreases. In my case, I process ~2 million rows at 500 in each batch... htwh,


Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
I would suggest taht you do the processes from VB or Vb.Net or C..

Built in multi-threading ability.



Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
As far as I know this can't be done in MS Access. Don't assume that executing multiple processes at once will be any quicker than doing one after another though. You could well end up spending a lot of time developing something which is at best no faster than your current code and at worse a lot slower.

I've never tried muti-threading in Access or VB6, but from the little I've read the general advice is don't unless you have to. It rarely seems to achieve what you want or expect.

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks for the input. However, multi-threading is done in many languages and while it takes carefull planning and programming, it can be very benficial, especially when you are talking about saving time.

I am processing more than 100 databases, ranging in size from 20,000 kb to 350,000 kb. on average they take 30 minutes to process.

If I could multi-thread the process, I could reduce the time in half or a quarter or a tenth.

There is not serious drain on my processor. It doesn't use up my ram,cache or any other computing resource, so why not consider it.

It is a very common practice in java and perl when you are dealing with large processing time or very large chunks of data.

David Pimental
(US, Oh)
 
Just a though: you may consider the Batch feature of ADODB.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV, are you talking about a Batch Update?

Also, if you are talking about a batch update, what advantages does it have to a simple update query. Can you use it where the field(s) being updated, are updated with different values.

The sample I saw, updated all the field to the same value.

David Pimental
(US, Oh)
 
Another quick related question. Is it possible to use an array and do a bulk update on a table / recordset ?

David Pimental
(US, Oh)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top