Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Declarations
SELECT Statement
DECLARATION: PARAMETERS
PARAMETERS name datatype [, name datatype [, ...]]
The
PARAMETERS
declaration creates parameters for a parameter query that you use regularly. When you run the query interactively, you will be presented with a dialog box in which you must enter the value(s) of the parameters. Each parameter consists of a name, which will appear in the dialog box if the query is run interactively, and a valid data type. If the name includes spaces or punctuation it must be enclosed in square brackets. For example, if you regularly ran a query to return a list of products that you wanted to promote as bargains, but wanted the freedom to alter the 'definition' of a bargain, you could use the following query which allows you to specify the value of a Bargain at run time.
PARAMETERS Bargain Currency;
SELECT Item, unitPrice AS Price FROM Products
WHERE UnitPrice < Bargain;
Note that the
PARAMETERS
declaration must appear first. You can include more than one parameter, but they must be separated by commas (,). And finally, the
PARAMETERS
declaration must end with a semi-colon.
The following example returns a list of tune names in response to criteria concerning the tune type and musician imposed by the user:
PARAMETERS [Select a musician] Text, [Select a tune type] Text;
SELECT Name FROM Tunes
WHERE Type = [Select a tune type] AND Musician = [Select a musician];
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information