Database
  Home arrow Database arrow Page 4 - Creating a Database Project in VS 2005
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? 
DATABASE

Creating a Database Project in VS 2005
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 10
    2006-07-10

    Table of Contents:
  • Creating a Database Project in VS 2005
  • Creating a new reference database
  • Creating a new query
  • The Query Editor

  • 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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry 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!

    Creating a Database Project in VS 2005 - The Query Editor
    (Page 4 of 4 )

    The Query Editor has four panes. The default view shows all the panes to the user. If you right click on an empty area in any pane you will bring up a context-sensitive drop-down where several types of actions may be performed. For example the next screen shows the various panes from one such drop-down. The four panes are Diagram, Criteria, SQL, and Results.

    In the diagram pane you will be bringing in the tables and establishing relationships that you may want to be included in the query. You may also choose the columns from the tables to be included in the query results.

    In the criteria pane you will be arranging for the sorting of the columns and their order, the visibility or otherwise of the columns that are included in the query, and any criteria that each of the columns need to satisfy. In the present example neither sorting (other than default) nor criteria were applied.

    In the SQL pane you may verify the SQL syntax, and you can make changes to the SQL statement for testing what if scenarios, before you make a  final decision.

    The results pane will show the result of the query in a tabulated view. It also shows how many rows were returned by the query. You also have the option of navigating through the results using Next, Previous, First and Last arrows.

    In this drop-down you may also change the type of query (currently it is a Select query) you want as shown in the next picture. The various choices that are supported by the provider are shown.

    You will see that in the SQL Pane you can verify as well as execute the SQL statement in view in that pane. In any of the panes you may execute the query. Additionally you also have a menu bar for some of the the database related activities as shown.

    Running the query and viewing results

    You may now execute the query from any of the panes, or from the menu bar at the editor. You will see the results as shown in the next picture. This query yielded 2155 rows of data with the first few rows in view.

    You may now save the query by going to File-->Savequeriesdetails.dtq or Ctrl+S as shown in the next picture. You may also save it under another name.

    If you now highlight the details.dtq query in the project explorer you can also see its properties as shown in the next picture. It shows the Query Editor-related information such as whether all columns were included, any parameters used, or any distinct value sought, and so forth.

    Summary

    This tutorial described the steps involved in creating a database project using the templates available in the Visual Studio 2005 IDE. The database project describes connecting to a networked Microsoft Access database and designing and evaluating the query which may be consumed by any other application created using the IDE.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · VS Studio based database projects provide scripted templates for all occasions from...
     

    DATABASE ARTICLES

    - Database Programming in C# with MySQL : Usin...
    - Formatting Techniques for Data Access from E...
    - Data Access from Excel VBA
    - Generating a Multiple Table Crystal Report u...
    - ADO and the Command Object
    - On Wiring Up an ADO Data Control
    - Reading and Writing to Files on the Intranet
    - Using ADO Record to Create and Navigate Intr...
    - Using Data Access Pages to Access Data on a ...
    - Using ADO with the SQL Native Client
    - ADO`s Stream Object
    - Opening a Record Object Referencing an Open ...
    - Introducing Jasper (SQL Anywhere 10 Beta)
    - Creating a Database Project in VS 2005
    - Manipulating ADO Recordsets




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