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
459 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET 2008 Winforms Signing 13 42
MailAddress in vb 4 36
Why use this lambda? 12 68
asp.net repeater 2 18
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

696 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