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
451 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
This code tracks birthdays 3 60
Error in JQuery 5 38
System.Speech 2 11
C# parent child form 5 17
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 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

21 Experts available now in Live!

Get 1:1 Help Now