ColdFusion
  Home arrow ColdFusion arrow Page 3 - Databases and Dreamweaver MX 2004, conclud...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
VeriSign Whitepapers 
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? 
COLDFUSION

Databases and Dreamweaver MX 2004, concluded
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2006-01-12

    Table of Contents:
  • Databases and Dreamweaver MX 2004, concluded
  • Using Dreamweaver MX 2004 to Create Queries
  • Using Dreamweaver MX 2004’s Advanced Recordset Interface
  • Writing a SELECT Query in Advanced Mode
  • Filtering by Multiple Parameters

  • 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
     
    IBM developerWorks
     
    ADVERTISEMENT

    Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!

    Databases and Dreamweaver MX 2004, concluded - Using Dreamweaver MX 2004’s Advanced Recordset Interface


    (Page 3 of 5 )

    The advanced mode in Dreamweaver allows you to customize SQL syntax and write complex queries that can select data from more than one table. To switch to advanced mode, simply click on the Advanced button in the top right of the Recordset dialog box. The advanced layout of the Recordset dialog box is shown in Figure 2-12.


    Figure 2-12.  The Advanced Recordset dialog box

    At the bottom of the window is the Database Items tree, which shows any existing tables, views, and stored procedures for the selected data source.

    We cover views and stored procedures in Chapter 6, but for now just expand the Tables tree by clicking on its plus symbol. You should see three database tables. You can expand these as well, as shown in Figure 2-13, to see the columns for each of these tables.


    Figure 2-13. You can expand the Database Items tree to view the structure of the database.

    If you followed the previous example and clicked Advanced, you would see the following SQL code, which Dreamweaver generated when you selected your options in the simple Recordset dialog, as shown in Figure 2-14.


    Figure 2-14.  Dreamweaver automatically generates this SQL code.

    The SQL statements shownSELECT the Dept_ID and Dept_Name from the Departmt table for all records where the location equals Cambridge, and then sort any matching records by department name in ascending order.

    TIP   It is important to note that SQL uses single quotation marks around strings. If you accidentally use double quotation marks, SQL will throw an error. Numbers and Booleans do not need single quotation marks around them.

    Notice that in theORDER BYstatement, department name in ascending order is specified. By default, SQL orders all columns in ascending order, so you could shorten this line toORDER BYDept_Name and produce exactly the same results. You can verify this by clicking on Test. To reverse the sort order, add theDESC(descending) keyword after the column name.

    Let’s create a few queries in advanced mode before moving on to writing SQL from scratch.

    More ColdFusion Articles
    More By Apress Publishing


       · This article is an excerpt from the book "ColdFusion Web Development with...
     

    Buy this book now. This article is excerpted from chapter two of the book ColdFusion Web Development with Dreamweaver MX 2004, written by Jen and Peter de Haan et al. (Apress, 2004; ISBN: 1590592379). Check it out today at your favorite bookstore. Buy this book now.

    COLDFUSION ARTICLES

    - How to Access a SQL Anywhere Database with C...
    - CFXML: Probing XMLDOM in ColdFusion
    - Creating a Web Service with ColdFusion: the ...
    - CFAjax: What it is and How to Use it
    - Querying SQL 2000 Server from ColdFusion
    - Introduction to ColdFusion Markup Language, ...
    - Introduction to ColdFusion Markup Language
    - Databases and Dreamweaver MX 2004, concluded
    - Databases and Dreamweaver MX 2004
    - Welcome to Coldfusion MX 6.1, concluded
    - Welcome to Coldfusion MX 6.1
    - What You Must Know About ColdFusion Flow-Con...
    - What You Must Know About Operators in ColdFu...
    - Everything You Must Know About ColdFusion Va...
    - My First Application on ColdFusion MX Server


    Iron Speed





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