gvector1 Posted January 14, 2004 Posted January 14, 2004 Hello everyone, I need some help PLEASE! I have an application in which I am accessing a MySql Database. I query the database and store the results in a datatable. I then have to pull select information from the results datatable and add them to a different datatable. Everything works fine except for when I try to add the first line to the new DataTable. The very first Row I Add takes 6-7 seconds, after that it takes no time. I won't have that problem again until I restart the application. Following is a snippet of code where the problem occurs: 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); } Does anyone have any suggestions as to what is causing this. Thanks, Kendal Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.