Microsoft KB Archive/265166

= FP2000: Data Type Mismatch Error Message When You Update Record to Database =

Article ID: 265166

Article Last Modified on 8/6/2002

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q265166



SYMPTOMS
When you attempt to update a distinct row in a database by using a custom query similar to the following sample query

Update DISTINCTROW

Set firstname='::firstname::'

Where ID='::ID::'

the query may not work as expected, and you may receive an error message similar to either of the following:

Database Results Error

Description: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

Number: -2147217913 (0x80040E07)

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.

-or-

Database Results Error Description: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

Number: -2147217913 (0x80040E07)

Source: Microsoft OLE DB Provider for ODBC Drivers

In the sample query, &quot;firstname&quot; is a text field and &quot;ID&quot; is an autonumber field in the database table.



CAUSE
This behavior can occur when a query parameter (for example, an autonumber field) is incorrectly designated as text.

Single quotation marks around a query parameter designate the parameter as text data.



RESOLUTION
To resolve this issue, remove the single quotation marks around a query parameter that is not text data.

For example, using the query shown in the &quot;Symptoms&quot; section of this article, the query should read as follows:

Update DISTINCTROW

Set firstname='::firstname::'

Where ID=::ID::

Note that the single quotation marks around the ID parameter are removed.



MORE INFORMATION
For additional information about working with databases in FrontPage, click the article number below to view the article in the Microsoft Knowledge Base:

206019 FP2000: ASP Web Wizard 2000 for Databases Available for Download

Additional query words: front page ocsso

Keywords: kberrmsg kbprb KB265166

-

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

© Microsoft Corporation. All rights reserved.