TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kendalgoodrich
NA
25
0
Slow Datatable.Rows.Add()
Jan 16 2004 5:02 PM
Quick question everyone, I have an application in which I am accessing a MySql Database. Everything is fine except for when I try to add some lines to a DataTable. The very first Row I Add takes 6-7 seconds, after that I never have that problem again until I restart the application. Following is a snippet of code where the problem occurs: [code] dsDoctorList.Clear(); DataTable dtDocAppts = dsDoctorList.Tables["DoctorAppts"]; DataTable dtDocs = docSql.PullDocs(); //Load Doctor Number and Name foreach(DataRow dr in dtDocs.Rows) { DataRow myRow = dtDocAppts.NewRow(); myRow["doctor"] = dr["doctor"]; myRow["name"] = dr["name"]; //Right here is where it takes so long on the first add dtDocAppts.Rows.Add(myRow); } [/code] Does anyone have any suggestions as to what is causing this. Thanks, Kendal
Reply
Answers (
4
)
Getting Date Format from SQL Server programatically
DataTable.Select()???