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
453 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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