|
This example shows the use of the
SearchAliasFields property.
Press the 'Search' button and chose a supplier to apply a filter to the recordset.
|
1 |
Aniseed Syrup
|
Exotic Liquids
|
|
2 |
Chef Anton's Cajun Seasonings
|
New Orleans Cajun Delights
|
|
3 |
Chef Anton's Gumbo Mix
|
New Orleans Cajun Delights
|
|
4 |
Grandma's Boysenberry Spread
|
Grandma Kelly's Homestead
|
|
5 |
Uncle Bob's Organic Dried Pears
|
Grandma Kelly's Homestead
|
|
|
|
This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
VbsDbNew objVbsDb
objVbsDb( "MdbPath" ) = "data/nwind.mdb"
objVbsDb( "GlobalOleDbProvider" ) = "ODBC"
objVbsDb( "Sql" ) = "select * from Products inner join Suppliers on Products.SupplierID=Suppliers.SupplierID"
objVbsDb( "GridFields" ) = "ProductName,CompanyName"
objVbsDb( "ViewNavigationPosition" ) = "top"
objVbsDb( "SearchFields" ) = "ProductName;SupplierID"
objVbsDb( "SearchAliasFields" ) = "SupplierID|Suppliers.SupplierID"
objVbsDb( "InputSelectFields" ) = "SupplierId|select SupplierId,CompanyName from Suppliers"
VbsDb objVbsDb
%>
This demonstrative program connects to
Nwind.mdb, the well known Microsoft Access sample database: the names of companies,
products, people,
characters, and/or data mentioned herein are fictious and are in no way
intended to represent any real individual, company, product, or event.
To download a copy of Nwind.mdb, please visit
Microsoft's site.
|