PC Review


Reply
Thread Tools Rate Thread

ADO.net -- slowness when writing data

 
 
=?Utf-8?B?QXJ0?=
Guest
Posts: n/a
 
      27th Oct 2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
best way to tackle issue with writing Data, Appending Data and Rea =?Utf-8?B?TFc=?= Microsoft ADO .NET 3 12th Oct 2007 09:10 PM
Writing a structure to a file (writing it as binary data) Mufasa Microsoft C# .NET 2 12th Jun 2007 04:28 PM
PRIMARY KEY required for WRITING data to SQL DATABASE using DATA G =?Utf-8?B?cG11ZA==?= Microsoft ADO .NET 5 29th Dec 2004 03:51 AM
RE: Q: Best way to take data from VBA into graphs without writing data =?Utf-8?B?SyBEYWxlcw==?= Microsoft Excel Programming 1 16th Dec 2004 11:12 PM
Slowness copying data to W2K share Scott Microsoft Windows 2000 Networking 2 10th Nov 2003 06:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:34 AM.