Solved

.MDB access slow in C# Upgraded to VS 2005 - Now old c# project VERY VERY slow handling Access .mdb files

Posted on 2006-11-24
6
449 Views
Last Modified: 2008-01-09
I have an application which manipulates a fairly large Access database (25000 records, 51Mb). Code snippets include:

Many lines of code missing, just to give you an idea of the code used....
CONN_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DATABASE_NAME;
oCONN = new OleDbConnection(CONN_STRING); // Set oCONN object
oCONN.Open(); // Open the oCONN

Saving...
oDA_new = new OleDbDataAdapter(sSQL,oCONN);
oDS_new = new DataSet(); // Create the DataSet
oDA_new.Fill(oDS_new,"Products");
DataRow oDR = oDS_new.Tables["Products"].NewRow();
oDS_new.Tables["Products"].Rows.Add(oDR);
oCB_new = new OleDbCommandBuilder(oDA_new);
oDA_new.Update(oDS_new,"Products");

With the old VS a database with a few thousand updated records would save in around 60 seconds.

With VS2005, the same application takes about 4 hours !!!!!

I ahve not changed any references between versions. Have you any idea why this has slowed so much ? I am now rewritting the program using SQL Server 2005 but until the program is fully developed I wish to use the old version without the 12 hour turn-around !

Help !

Fully qualified answer needed and positive outcome to receive points. Thankyou
0
Comment
Question by:nvms
  • 3
  • 3
6 Comments
 
LVL 41

Expert Comment

by:graye
ID: 18009655
Hummm....   Which version of visual studio was the original program written in VS2002 (Framework v1.0) or VS2003 (Framework v1.1)?   Did you do an "automatic upgrade" or a by-hand rewrite?

BTW:  Since Microsoft gives away SQL Server Express, I'd highly recommend that you convert from Microsoft Access
0
 

Author Comment

by:nvms
ID: 18010571
Thanks for your comments. The original app was written in VS2002 1.1 and a .Net 2.0 upgrade made no difference to performance.

As mentioned in the question "I am now rewritting the program using SQL Server 2005 but until the program is fully developed I wish to use the old version " so a SQL Server Express based project is under development.

Yes it was an automatic upgrade.
0
 
LVL 41

Expert Comment

by:graye
ID: 18011417
Wait, now I'm confused....   I thought it ran fast before the upgrade, and only after the upgrade it slowed down
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:nvms
ID: 18017671
The .Net 2.0 upgrade made no difference (upgrade patch from MS). What DID make a difference was upgrading from VS2002/3.Net to Visual Studio 2005.

I have made great progress with SQL Server 2005 so may cancel this question now anyway. Thanks for your help.
0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 18018722
I've written dozens of VS2002/VS2003 applications that read/write to Microsoft Access.  I've never had any performance problem with "converting" to VS2005.

Do you still have the pre-converted application to run as a test?

Oh well, It doesn't matter now...
0
 

Author Comment

by:nvms
ID: 18024101
Thanks mate, points are yours for taking the effort to help.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now