SunQuest
 
       Database Code
  Home arrow Database Code arrow Page 2 - Using the AccessDataSource Control in VS 2...
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 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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? 
DATABASE CODE

Using the AccessDataSource Control in VS 2005
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2006-07-17

    Table of Contents:
  • Using the AccessDataSource Control in VS 2005
  • Querying the database
  • Binding the query result to a GridView
  • Binding data to a drop-down list control

  • 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Using the AccessDataSource Control in VS 2005 - Querying the database


    (Page 2 of 4 )

    Against the database you can run a SQL statement (or a stored procedure), or specify the columns you need displayed by making the appropriate choice. Here a decision has been made to specify the columns, and from the drop-down the appropriate table (Employees) has been chosen with a couple of columns. The SQL statement for the chosen columns appears in the Select Statement: area. You can do more advanced filtering and ordering of your data using the buttons shown on the right. You may also return unique rows of data if you choose to do so. On the other hand you can go to the previous screen and make changes if you like.

    When you click on the Next button you will be given a chance to test the query and display its output in the text area as shown.

    The field (column) "Photo" was chosen in the select statement, and when the Test Query button was clicked, an error message was shown as in the next picture. It shows the message that you should not choose Memo, OLE Object, or hyperlinks for displaying in the above window. 

    Click OK to this screen, hit the previous button and drop the column "Photo"  by unchecking it. Proceeding forward will display the text only result.

    Now click the Finish button, which completes the configuration of the data source for the AccessDataSource control. The configuration parameters that you have chosen and the defaults can be see when you right click to display the properties, as shown in the next picture.

    More Database Code Articles
    More By Jayaram Krishnaswamy


       · It's not only athletes take steroids, even programs can. AccessDataSource control...
     

    DATABASE CODE ARTICLES

    - Deployment of the MobiLink Synchronization M...
    - MobiLink Synchronization Wizard in SQL Anywh...
    - Finding Matching Records in Data Access Pages
    - Using the AccessDataSource Control in VS 2005
    - A Closer Look at ADO.NET: The Command Object
    - A Closer Look at ADO.NET: The Connection Obj...
    - Using ADO to Communicate with the Database, ...
    - Code Snippets: Counting Records
    - Constraints In Microsoft SQL Server 2000
    - Multilingual entries into a DB and to be dis...
    - Getting A List of Tables From SQL Server
    - SQL Server Database Creator - .NET Version
    - ADO Recordset Paging
    - Two combos, one textbox example
    - Discussion & Listserv Module by Mike Eck...





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