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
Cor Ligthert - 28 Feb 2005 08:33 GMT
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
Bruce A. Julseth - 28 Feb 2005 13:09 GMT
> Bruce,
>
[quoted text clipped - 17 lines]
>
> Cor
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
Cor Ligthert - 28 Feb 2005 13:46 GMT
Bruce,
I am alway naming it this for myself probably Autokey
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdatadatacolumnclassautoincrementtopic.asp
Autoincrement key
Cor
Bruce A. Julseth - 28 Feb 2005 15:52 GMT
> Bruce,
>
> I am alway naming it this for myself probably Autokey
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemdatadatacolumnclassautoincrementtopic.asp
> Autoincrement key
>
> Cor
Cor:
Yes, I am using autoincrement on my PrimaryKey..
Bruce
Sahil Malik - 28 Feb 2005 16:07 GMT
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/
> 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
[quoted text clipped - 5 lines]
>
> Bruce