By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,133 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,133 IT Pros & Developers. It's quick & easy.

ADO.net -- slowness when writing data

P: n/a
Art
Hi,

I'm working on an application that writes records to an Access database.
What I've got so far works, but very slowly.

I have one class that creates the data -- some of it is as follows (this is
in a block that's reading data).

mFieldValues = String.Format(" Values({0},""{1}"",""{2}"",""{3}"",""{4}"")", _
.GetInt32(0), .GetString(1), .GetString(3), .GetString(4),
mMyRegion)
mAppender.AppendLine(mFieldValues)

mAppender is a class that does the writing and where the slowness appears to
be. The writing is done here:

Public Sub AppendLine(ByVal mFieldvalues As String)
dbCmd.CommandText = "INSERT INTO " & mTable & _
Me.FieldNames & mFieldvalues
dbCmd.ExecuteNonQuery()
End Sub

Does anyone have any suggestions as to what I may be doing wrong. It seems
to take about 1 minute per 500 records. I eliminated the write, and just did
the reading, that went very fast. I hard coded sample values to avoid the
..getstring stuff, that made no difference.

thanks,
Art
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.