The .inc files are include files that are generated by the
FrontPage Database Results Wizard. The .inc files are saved in the
_fpclass folder of a Web site. The .inc files contain all the database
functionality. Editing the .inc files is not supported in
FrontPage.
The following list describes three common .inc files:
- The Fpdblib.inc file
This .inc file is the database library file. The
Fpdblib.inc file contains functions and subroutines that perform a variety of
tasks. - The Fpdbrgn1.inc file
This .inc file is the first part of a database results
region. The Fpdbrgn1.inc file opens the database connection and starts the loop
through the data. - The Fpdbrgn2.inc file
This .inc file is the second part of a database results
region. The Fpdbrgn2.inc file closes the database connection and ends the loop
through the data.
The following text shows examples of invalid queries against a
database:
Insert Into Categories (CategoryID, CategoryName, Description) Values (::UniqID::, '::CategName::', '::CategDesc::')
SELECT * FROM products WHERE ::param:: = 1
SELECT * FROM products WHERE CategoryID ::foo:: 2
SELECT Count(*) AS ::name:: FROM products
SELECT * FROM products WHERE upper(ProductName) = upper('::param::')
SELECT * FROM Employees WHERE InvalidColumName=::foo::
The following text shows examples of valid queries against a
database.
Note All FrontPage parameterized custom queries should
follow the
CLAUSE + (Column name + Operator + ::parameter::) format. All existing queries that do not follow this format
cannot be authored by using the FrontPage Database Results Wizard. If you use the correct syntax and still receive the "The custom query contains errors" error, make sure that the case of the field names in the query matches the case of the field names in the tables.
Update Categories Set Description = '::CategDesc::' Where CategoryID = '::CategID::'
SELECT * FROM products WHERE (ProductName LIKE '%::searchtext::%')
SELECT Products.ProductID, Products.ProductName, Categories.CategoryName FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID WHERE Categories.CategoryName LIKE '%::CatName::%'
SELECT FirstName, LastName, HireDate FROM Employees WHERE HireDate > '::HireDate::'
SELECT * FROM Categories,Products WHERE Categories.CategoryID=::ID:: and Categories.CategoryID=Products.CategoryID
SELECT ProductID, ProductName FROM products WHERE ( (CategoryID=::catid::) AND (ProductName LIKE '%::searchtext::%') )
SELECT Count(*) AS NumberOfProducts FROM products WHERE (ProductName LIKE '%::searchtext::%')
SELECT Count(*) AS ProductCount FROM products HAVING (ProductName LIKE '%::SEARCHTEXT::%')
SELECT * FROM products ORDER BY ::SortFld:: ASC