Visual Basic.NET
  Home arrow Visual Basic.NET arrow How to Use Data Sources with Databases
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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


    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

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek