Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / February 2005

Tip: Looking for answers? Try searching our database.

How do I "refresh" my bound control?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bruce A. Julseth - 28 Feb 2005 04:38 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.