Visual Basic.NET
  Home arrow Visual Basic.NET arrow How to Use Data Sources with Databases
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

How to Use Data Sources with Databases
By: Murach Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2006-11-02

    Table of Contents:
  • How to Use Data Sources with Databases
  • How to start the Data Source Configuration Wizard
  • How to choose a data source type
  • How to create a connection to a database
  • How to choose database objects for a data source

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    How to Use Data Sources with Databases
    (Page 1 of 5 )

    Visual Studio 2005 has some excellent features for working with data, but there are some things you need to do before you can use them. This article, the first of two parts, explains. It is excerpted from chapter 14 of the book Murach's Visual Basic 2005, written by Anne Boehm (Murach, 2006; ISBN: 1890774383).

    How to create a data source

    Before you can take advantage of Visual Studio 2005’s new features for working with data, you must create a data source for the application. As its name implies, a data source specifies the source of the data for an application. Since most applications get their data from a database, the next five figures show how to create a data source that gets data from a database.

    How to use the Data Sources window

    The data sources that are available to a project are listed in the Data Sources window as shown in figure 14-1. Here, the second screen shows a data source for the Products table that’s available from the MMABooks database described in the previous chapter. As you can see, this data source includes three columns from the Products table named ProductCode, Description, and UnitPrice.

    If no data sources are available to a project, the Data Sources window will display an Add New Data Source link as shown in the first screen. Then, you can click on this link to start the Data Source Configuration Wizard described in figures 14-2 through 14-4. This wizard lets you add a new data source to the project. When you’re done, you can drag the data source onto a form to create bound controls as described later in this chapter.

    An empty Data Sources window

    A Data Sources window after a data source has been added

    Description
    1. A data source shows all the tables and columns in the dataset that are available to your application.
    2. You can display the Data Sources window by clicking on the Data Sources tab that’s usually grouped with the Solution Explorer at the right edge of the Visual Studio window or by selecting the Show Data Sources command from the Data menu.
    3. To create a data source, you can click the Add New Data Source link. Then, you can drag the data source to a form to create controls that are bound to the data source.

    Figure 14-1.  How to use the Data Sources window

    More Visual Basic.NET Articles
    More By Murach Publishing


       · This article is an excerpt from the book "Murach's Visual Basic 2005," published by...
     

    Buy this book now. This article is excerpted from chapter 14 of the book Murach's Visual Basic 2005, written by Anne Boehm (Murach, 2006; ISBN: 1890774383). Check it out today at your favorite bookstore. Buy this book now.

    VISUAL BASIC.NET ARTICLES

    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...
    - More on Controlling Windows Fax Services Usi...
    - Programmatically Controlling Windows Fax Ser...
    - Focusing on Forms and Menus in Visual Basic
    - Manipulating Forms with the Windows Forms Li...
    - Basics of the Windows Forms Library
    - Forms, Controls, and Other Useful Objects
    - Implementing OOP to Develop Database Oriente...
    - Using Themes and Skins for Personalization w...
    - A Deeper Look at Personalization using Visua...

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway