Microsoft KB Archive/299911

= &quot;Database Results Error&quot; error message when you preview a page in FrontPage 2002 =

Article ID: 299911

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft FrontPage 2002 Standard Edition

-



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 &quot;Symptoms&quot; 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.</ol> </li> Specify a default value for the numeric data types: <ol style="list-style-type: lower-alpha;"> In FrontPage, right-click the Database Results region, and then click Database Results Properties on the menu that appears.

The Database Results Wizard starts.</li> Click Next two times.

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

<div class="moreinformation_section">

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

Additional query words: prb

Keywords: kberrmsg kbopenfile kbprb KB299911

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.