Troubleshooting SQL table/VB interface update issues

Troubleshooting SQL table/VB interface update issues

I'm using SQL tables tied to VB interfaces. I have two interfaces with a datagrid on one. When I enter information on one form it goes into my SQL tables and the datagrid on the first page. When I go to the second page, the updated information simply isn't there. Obviously, I'm getting the updates into my database but why is it not updating my second interface when it updates my first interface?

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

You're probably binding the datagrids to DataSets. It's important to understand that DataSets are disconnected from the datasource. Once you filled them though a DataAdapter, the connection is closed. If you want updated data, you will have to use DataAdapter.Fill() again. There's no magic live-data there: the application must go to the database and get the newer data, that's it.

This was first published in October 2004