Home All Groups Group Topic Archive Search About

How do I "refresh" my bound control?

Author
28 Feb 2005 4:38 AM
Bruce A. Julseth
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
Author
28 Feb 2005 8:33 AM
Cor Ligthert
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
Are all your drivers up to date? click for free checkup

Author
28 Feb 2005 1:09 PM
Bruce A. Julseth
Show quote Hide quote
"Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message
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
>
>

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
Author
28 Feb 2005 1:46 PM
Cor Ligthert
Author
28 Feb 2005 3:52 PM
Bruce A. Julseth
"Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message
news:OQ7cQvZHFHA.4060@TK2MSFTNGP14.phx.gbl...
> 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:

Yes, I am using autoincrement on my PrimaryKey..

Bruce
Author
28 Feb 2005 4:07 PM
Sahil Malik
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
>
>

Bookmark and Share