"Database Results Error" error message when you preview a page in FrontPage 2002 (299911)



The information in this article applies to:

  • Microsoft FrontPage 2002

This article was previously published under Q299911
For a Microsoft FrontPage 2000 version of this article, see 265320.

SYMPTOMS

When you preview a page in a Web browser, you receive an error message similar to the following:
Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '(EmployeeID = AND FirstName = '')'.
Number: -2147217900 (0x80040E14)
Source: Microsoft OLE DB Provider for ODBC Drivers

One or more form fields were empty. You should provide default values for all form fields that are used in the query.
The error message appears in the Database Results region of a page containing a search form that queries the database by using selected criteria.

CAUSE

This problem occurs because empty number fields are not recognized as numbers and result in a data type mismatch error.

RESOLUTION

To have the page appear without the error described in the "Symptoms" section of this article, use a default value for any database field that has a numeric data type. First determine which fields have Number or AutoNumber data types, and then specify default values for the numeric data types used by the Database Results region. To do this, follow these steps:
  1. Identify the fields that have Number or AutoNumber data types:
    1. In FrontPage, click Folders on the View menu. In the Folder list, double-click the Fpdb folder to open it. Double-click the Microsoft Access database file that you are using with your query.
    2. In Access, highlight the table or query that is the source of data for the search form, and then click Design.
    3. Note the names of any fields that have a data type of Number or AutoNumber.
    4. Close the file and quit Access.
  2. Specify a default value for the numeric data types:
    1. In FrontPage, right-click the Database Results region, and then click Database Results Properties on the menu that appears.

      The Database Results Wizard starts.
    2. Click Next two times.

      You should be at the third step in the Wizard.
    3. Click More Options. In the More Options dialog box, click Defaults.
    4. Select a field that has the Number or AutoNumber data type and click Edit.
    5. In the Value box, type a default numeric value. For example, type 0 (zero), and then click OK.
    6. Repeat steps d and e for each field that has a Number or AutoNumber data type.
    7. Click OK twice to return to the third step in the wizard.
    8. Click Next twice, and then click Finish.
  3. On the File menu, click Save.
  4. On the File menu, click Preview in Browser.

MORE INFORMATION

For additional information about working with FrontPage and Access data types, click the article number below to view the article in the Microsoft Knowledge Base:

284843 FP2002: Error Querying Date/Time Fields in Access Database

265176 FP2000: Microsoft Access 2000 Hyperlink Fields Are Displayed As URLs Rather Than Descriptive Text


Modification Type:MinorLast Reviewed:10/8/2004
Keywords:kberrmsg kbopenfile kbprb KB299911