Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic
Using ADO .NET - Changing Databases - Part 4
When Something Has To Change!
Databases

In Part 3 of this series, we reported values from a database in ListBox objects using wizards to do the heavy lifting. The topic that was left out of that discussion was how to change the database. Let's see how well Microsoft's wizards can do that job for us and how much code is left for us to write when we use a wizard for updating.

-----------------------------------------

About.com also has a database focused site at databases.about.com.

This series will focus on the VB .NET language aspects of ADO .NET. Go to About Databases for more information 'About' building and using databases.

-----------------------------------------


 More of this Feature
• 2 - Selecting Part Of The Database
• 3 - Binding and Changes
• 4 - The Code and Download
 
 Join the Discussion
Is this the kind of article that helps you?
Let us know!
 
 Related Resources
• Part 1 of the ADO .NET Series
• Part 2 of the ADO .NET Series
• Part 3 of the ADO .NET Series
• VB .NET Books!
• New to VB .NET?
  Learn It Here!
 
 Elsewhere on the Web
• About.Com DATABASES
 

To 'lay the groundwork' for making changes to our database, let's rush through a few more statements about reporting that we haven't seen yet. Again, we will use our Access database containing About Visual Basic Spotlight articles and again, the Access file can be found in the download along with the source code.

Access database

Wizards don't do anything you can't do with your own code. They just automate the process of creating that code (and sometimes make the changes a little harder to find). To customize your program after using a wizard, you just have to modify what the wizard did. This is mainly a process of knowing what it is and where to find it. Let's change our program to retrieve just part of the records in the Access database to give you the idea before discussing how to program database changes in detail.

The property that we'll change is the Select SQL statement in the DataAdapter object. While we're doing this, we'll also modify the DataAdapter to add the ability to make changes in the database. (Originally, we only generated a DataAdapter capable of selecting records.)

Changing the Select Command

Next page > Selecting Part Of The Database > Page 1, 2, 3, 4

Explore Visual Basic

By Category

About.com Special Features

Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.