This example shows the use of the Sql property. Note that joins are fully supported.
  ProductName CompanyName
1 Chai Exotic Liquids
2 Chang Exotic Liquids
3 Aniseed Syrup Exotic Liquids
4 Chef Anton's Cajun Seasoning New Orleans Cajun Delights
5 Chef Anton's Gumbo Mix New Orleans Cajun Delights
CompanyName Exotic Liquids
ProductName Chai
UnitPrice 18
 First   Prev   Next   Last   Search 
This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
   VbsDbNew objVbsDb
   objVbsDb( "MdbPath" ) = "data/nwind.mdb"
   objVbsDb( "Sql" ) = "select * from Suppliers inner join Products on Suppliers.SupplierID = Products.SupplierID"
   objVbsDb( "GridFields" ) = "ProductName;CompanyName"
   objVbsDb( "FormFields" ) = "CompanyName;ProductName;UnitPrice"
%>
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.