"Database Results Error" error message when you preview a page in FrontPage 2002 (299911)
The information in this article applies to:
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:
- Identify the fields that have Number or AutoNumber data
types:
- 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.
- In Access, highlight the table or query that is the
source of data for the search form, and then click Design.
- Note the names of any fields that have a data type of Number or AutoNumber.
- Close the file and quit Access.
- Specify a default value for the numeric data types:
- In FrontPage, right-click the Database Results region, and then click Database Results Properties on the menu that appears.
The Database Results Wizard
starts. - Click Next two times.
You should be at the third step in the
Wizard. - Click More Options. In the More Options dialog box, click Defaults.
- Select a field that has the Number or AutoNumber data
type and click Edit.
- In the Value box, type a default numeric value. For example, type
0 (zero), and then click OK.
- Repeat steps d and e for each field that has a Number
or AutoNumber data type.
- Click OK twice to return to the third step in the wizard.
- Click Next twice, and then click Finish.
- On the File menu, click Save.
- On the File menu, click Preview in Browser.
Modification Type: | Minor | Last Reviewed: | 10/8/2004 |
---|
Keywords: | kberrmsg kbopenfile kbprb KB299911 |
---|
|