![]() ![]() You should check how much time it takes for your sproc to execute. Though, not on the dataset, maybe that saves some time (seems unlikelyĭim dt as DataTable = ctype(myGrid.DataSource, DataTable) Most of the time is used up by sqlserver executing the sproc. now i want to refresh the dataset so that the newly > I have a function that call a stored procedure which performs an insert command. now i want to refresh the dataset so that the newly> inserted data will be available to my datagrid> I have tried to call> DsStudentCourse1.Tables("SchYrSemCourseJoin").Clea r()> SqlDataAdapter3.Fill(DsStudentCourse1)> However, the fill method causes a lot of time to process.> anyone know what is the best way to fill/refresh the dataset again so> that the newly inserted records will be available to my datagrid?> thanks in advance.> See more> in this recent MSDN magazine article: -> Regards> Joyjit> "jaYPee" wrote in message> I have a function that call a stored procedure which performs an> insert command. When the> new thread is finished the callback mechanism will let the main threadknow> that the operation is finished, so that you can show the results. just my thought, and when I see something wrong tell me?Coir"Joyjit Mukherjee" > Hi,> if the data to be loaded to the dataset is relatively large, the best wayof> calling the fill method is via a callback method asynchronously which will> create a separate thread to run in parallel with the main thread. I think that when you want this kind of things using the dataadapter events Thread of course as well however makes it only more difficult, because of Which means that when there are errors those are never catched and yourĭatabase has errors somewhere in the middle. That he can close his application while the datagrid is updating. It, however for the enduser it gives in my opinion not any benefit except It looks for me a nice method for the programmer who can be very proud on The user is only interested that his screen is not freezed but while doing With this sample you now have to monitor that the work is done. Can you tell me what is the benefit from this, That the newly inserted records will be available to my datagrid? However, the fill method causes a lot of time to process.Īnyone know what is the best way to fill/refresh the dataset again so Inserted data will be available to my datagridĭsStudentCourse1.Tables("SchYrSemCourseJoin").Clea r() "jaYPee" wrote in I have a function that call a stored procedure which performs an That the operation is finished, so that you can show the results. New thread is finished the callback mechanism will let the main thread know If the data to be loaded to the dataset is relatively large, the best way ofĬalling the fill method is via a callback method asynchronously which willĬreate a separate thread to run in parallel with the main thread. ![]()
0 Comments
Leave a Reply. |