This article has been archived. It is offered "as is" and will no longer be updated.
Consider the following scenario. You upgrade Microsoft FrontPage 2002 to Microsoft Front Page 2002 Service Pack 3 (SP3) or to Microsoft Office FrontPage 2003. You open an active server page (ASP) page that was created by using the Database Results Wizard. You save the ASP page. In this scenario, you may receive the following error message when you browse the ASP page:
Database Results Wizard Error The operation failed. If this continues, please contact your server administrator.
Additionally, if you set the fp_DEBUG value to True in the Fpdbrgn1.inc file in the _fpclass folder, you receive the following error message when you browse the ASP page:
Database Results Wizard Error Your page contains a query with user input parameters that could not be resolved. This could happen if your DatabaseRegionStart webbot has an empty or missing s-columnnames or s-columntypes attributes. You may need to read Microsoft Knowledge Base Article 817029. One or more form fields were empty. You should provide default values for all form fields that are used in the query.
Note This behavior also occurs if you browse an ASP page that was created by using the Database Results Wizard in FrontPage 2003.
This behavior occurs when you use a custom SQL query that has parameters in the Database Results Wizard.
This problem occurs because the .inc files are updated when you upgrade to FrontPage 2002 SP3 or to FrontPage 2003. After the .inc files are updated, the custom SQL queries that have parameters are no longer processed by these .inc files.
Note This problem occurs only if the parameter in the custom SQL query is outside the WHERE clause.
To resolve this problem, obtain the latest service pack for Microsoft Office 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
After you install Microsoft Office 2003 SP2, you have to reopen and save each ASP page that was created by using the Database Results Wizard. When you save the ASP page, the .inc files will be rewritten.
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:: = 1SELECT * FROM products WHERE CategoryID ::foo:: 2SELECT Count(*) AS ::name:: FROM productsSELECT * 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.CategoryIDSELECT 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
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
871267 You receive an "Unable to find operator in query string" error message when you use the ORDER BY parameter in a custom SQL query in FrontPage 2003