|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I "refresh" my bound control?After I've completed an update of my data to my database, how do I "refresh"
bound controls. Right now, I am doing EXACTLY the same as I did when I initially bound them, ie. setting up the DataAdapter, reFILLing the DataSet, then Binding.Add to each of the controls. This seems like a waste. I am hoping there is a more "elegant" way. Thank you. Bruce Bruce,
This depends on a lot of ways and has not one answer. Two situations I think about direct are. You are using autokeys, than the only waste can be setting up the dataadapter more than strictly needed, in my opinion is that a very elegant way. However, probably you loose some nanoseconds with that. The way that I understand you are doing it now is the way I would do it in this situation as well. Are you not using autokeys, than you can think about doing nothing beside just correcting the trowed and solved concurrency (and other) errors in your dataset and than accept the changes. Your problem can be in the last situation that deletes or new inserts done by others are not done in your dataset. The kind of work you are doing will decide if that is important or not. I hope this helps to make your decissions. Cor
Show quote
Hide quote
"Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message Cor:news:eNDrcAXHFHA.3332@TK2MSFTNGP15.phx.gbl... > Bruce, > > This depends on a lot of ways and has not one answer. Two situations I think > about direct are. > > You are using autokeys, than the only waste can be setting up the > dataadapter more than strictly needed, in my opinion is that a very elegant > way. However, probably you loose some nanoseconds with that. The way that I > understand you are doing it now is the way I would do it in this situation > as well. > > Are you not using autokeys, than you can think about doing nothing beside > just correcting the trowed and solved concurrency (and other) errors in your > dataset and than accept the changes. Your problem can be in the last > situation that deletes or new inserts done by others are not done in your > dataset. The kind of work you are doing will decide if that is important or > not. > > I hope this helps to make your decissions. > > Cor > > Sorrry.. I don't know what "autokeys" is, so I can't determine if I'm doing what you suggest in Item 1. Thanks.. Bruce Bruce,
I am alway naming it this for myself probably Autokey http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatacolumnclassautoincrementtopic.asp Autoincrement key Cor "Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatacolumnclassautoincrementtopic.asp
news:OQ7cQvZHFHA.4060@TK2MSFTNGP14.phx.gbl... > Bruce, > > I am alway naming it this for myself probably Autokey > > > Yes, I am using autoincrement on my PrimaryKey..> Autoincrement key > > Cor > > Cor: Bruce Bruce,
You can probably get away with refilling the dataset by just getting the changes and merging them with the dataset. That however doesn't take care of deleted rows. - Sahil Malik http://codebetter.com/blogs/sahil.malik/ Show quoteHide quote "Bruce A. Julseth" <bruceajNoSpam@attglobal.net> wrote in message news:e7G1U9UHFHA.3156@TK2MSFTNGP10.phx.gbl... > After I've completed an update of my data to my database, how do I "refresh" > bound controls. Right now, I am doing EXACTLY the same as I did when I > initially bound them, ie. setting up the DataAdapter, reFILLing the DataSet, > then Binding.Add to each of the controls. This seems like a waste. I am > hoping there is a more "elegant" way. > > Thank you. > > Bruce > >
Other interesting topics
|
|||||||||||||||||||||||