473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Db Interaction spped issue with upgraded code from vb6 to vb.net

LDD
Hi Folks

I've recently upgraded an app from vb6 to vb.net

I've run into an issue where it takes about 15-20 times longer to write 1000
records to an MS Access database. (I'm sure it takes that long for 1 record
as well)

I'm writing 300k+ records to the database. The total time in VB6 to do this
is 10 min. in VB.Net it's about 3+ hours.

I'm adding the records using a DAO recordset..

The connection to a DAO.Database is made through a DAO.DbEngine

Dim myDB As DAO.Database
Dim mydbengine As DAO.DBEngine

mydbengine = New DAO.DBEngine
myDB = mydbengine.OpenDatabase(Application.StartupPath +
"\db\databaseName.mdb")

Switching to SQL, MSDE, or any other database technology is not an option at
this point. I must fix this issue.

My questions are as follows:

1. I've read that there is no official support for DAO in VN.Net. Can this
be the real reason
2. Will swithching to ADO.Net and connecting to the db using OleDb speed up
or slow down the process. I have read that using ADO.Net to connect to an MS
Access db, can be slow.
3. Are there other alternatives to speed up the process and get it back to
an acceptable state? Using MS Access and VB.Net of course.

I welcome any help on this issue

thanks folks

LDD
Dec 23 '05 #1
3 1382
Hi,

Using native dot net functions are always much faster. You will see a
big improvement by switching to ado.net.

Ken
----------------------------

"LDD" wrote:
Hi Folks

I've recently upgraded an app from vb6 to vb.net

I've run into an issue where it takes about 15-20 times longer to write 1000
records to an MS Access database. (I'm sure it takes that long for 1 record
as well)

I'm writing 300k+ records to the database. The total time in VB6 to do this
is 10 min. in VB.Net it's about 3+ hours.

I'm adding the records using a DAO recordset..

The connection to a DAO.Database is made through a DAO.DbEngine

Dim myDB As DAO.Database
Dim mydbengine As DAO.DBEngine

mydbengine = New DAO.DBEngine
myDB = mydbengine.OpenDatabase(Application.StartupPath +
"\db\databaseName.mdb")

Switching to SQL, MSDE, or any other database technology is not an option at
this point. I must fix this issue.

My questions are as follows:

1. I've read that there is no official support for DAO in VN.Net. Can this
be the real reason
2. Will swithching to ADO.Net and connecting to the db using OleDb speed up
or slow down the process. I have read that using ADO.Net to connect to an MS
Access db, can be slow.
3. Are there other alternatives to speed up the process and get it back to
an acceptable state? Using MS Access and VB.Net of course.

I welcome any help on this issue

thanks folks

LDD

Dec 23 '05 #2


you will not even get close to the speed of VB6 icw DAO / ADO ( win 32 )

as DAO is fully optimized for the ACCESS database engine ,,,,,,

i do also claim that ADO ( Win 32 ) is faster for updating a ACCESS
database , this because of its connected possibility`s , for reading data
you can gain a lot of benefit with ADO.NET if you did not know how to use
the options in ADO ( win32 ) ( as you could also create a firehose cursor in
this version wich ADO.Net now defaults to )

However using DAO or ADO ( win 32 ) will be much slower because everything
has to be marshalled to the .Net platform using ADO.Net will give you a
speed boost however ADO.Net `s Speed should be more seen as that it is fast
to program with not about its performance when we speak about Access ( it
is another story with SQL where it is superior to everything there was
before )
so if speed is a requirment i can only give you this advice

1. switch to SQL express as database
2. stay with DAO but also stay with VB6
regards

Michel Posseth [MCP]

"Ken Tucker [MVP]" <Ke**********@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
Hi,

Using native dot net functions are always much faster. You will see a
big improvement by switching to ado.net.

Ken
----------------------------

"LDD" wrote:
Hi Folks

I've recently upgraded an app from vb6 to vb.net

I've run into an issue where it takes about 15-20 times longer to write
1000
records to an MS Access database. (I'm sure it takes that long for 1
record
as well)

I'm writing 300k+ records to the database. The total time in VB6 to do
this
is 10 min. in VB.Net it's about 3+ hours.

I'm adding the records using a DAO recordset..

The connection to a DAO.Database is made through a DAO.DbEngine

Dim myDB As DAO.Database
Dim mydbengine As DAO.DBEngine

mydbengine = New DAO.DBEngine
myDB = mydbengine.OpenDatabase(Application.StartupPath +
"\db\databaseName.mdb")

Switching to SQL, MSDE, or any other database technology is not an option
at
this point. I must fix this issue.

My questions are as follows:

1. I've read that there is no official support for DAO in VN.Net. Can
this
be the real reason
2. Will swithching to ADO.Net and connecting to the db using OleDb speed
up
or slow down the process. I have read that using ADO.Net to connect to an
MS
Access db, can be slow.
3. Are there other alternatives to speed up the process and get it back
to
an acceptable state? Using MS Access and VB.Net of course.

I welcome any help on this issue

thanks folks

LDD

Dec 26 '05 #3
LDD
thanks man.

I recently rewrote this section to make use of ADO.Net and it works great.

LDD

"Ken Tucker [MVP]" <Ke**********@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
Hi,

Using native dot net functions are always much faster. You will see a big improvement by switching to ado.net.

Ken
----------------------------

"LDD" wrote:
Hi Folks

I've recently upgraded an app from vb6 to vb.net

I've run into an issue where it takes about 15-20 times longer to write 1000 records to an MS Access database. (I'm sure it takes that long for 1 record as well)

I'm writing 300k+ records to the database. The total time in VB6 to do this is 10 min. in VB.Net it's about 3+ hours.

I'm adding the records using a DAO recordset..

The connection to a DAO.Database is made through a DAO.DbEngine

Dim myDB As DAO.Database
Dim mydbengine As DAO.DBEngine

mydbengine = New DAO.DBEngine
myDB = mydbengine.OpenDatabase(Application.StartupPath +
"\db\databaseName.mdb")

Switching to SQL, MSDE, or any other database technology is not an option at this point. I must fix this issue.

My questions are as follows:

1. I've read that there is no official support for DAO in VN.Net. Can this be the real reason
2. Will swithching to ADO.Net and connecting to the db using OleDb speed up or slow down the process. I have read that using ADO.Net to connect to an MS Access db, can be slow.
3. Are there other alternatives to speed up the process and get it back to an acceptable state? Using MS Access and VB.Net of course.

I welcome any help on this issue

thanks folks

LDD

Jan 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
2
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
2
by: Chakkaradeep | last post by:
hi all, as it was discussed earlier in this forum titled,"Execution of Another Application in Services", i got the answer that Services are not meant for executing another applications, but...
0
by: Joakim Hove | last post by:
Dear newsgroup, I have written a cgi script in Python, and it has worked fine for some time. Now the installed Python version has been upgraded to 2.4.1 and I am having problems with non ascii...
0
by: Sisnaz | last post by:
I have 2 computers running with Windows Vista (final). One system where I upgraded from XP and the other as a fresh install. My executables run without issue on the system where I upgraded from XP....
1
by: Phoenix | last post by:
Hi Friends, Any help would be highly appreciated for the following problem : I have a vb 6 application which makes call to an API in some dll which returns an array of strings and no of...
0
by: Shades799 | last post by:
Hi All, I was wondering if any of you could help me with a very difficult problem that I am having. I have an ASP site that works with an Oracle database using an ADODB connection. This...
0
by: Omar Abid | last post by:
Reason of this project: The Microsoft.VisualBasic.Interaction class exposes many useful commands and methods that were available in Visual Basic like AppActivate, Beep, Callbyname... This...
3
by: mmm | last post by:
I am looking for advice on Python Editors and IDEs I have read other posts and threads on the subject and my two questions at this time are mainly about the IDLE-like F5-run facilities. While I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.