Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article was previously published under Q265166

↑ Back to the top


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 table name
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, "firstname" is a text field and "ID" is an autonumber field in the database table.

↑ Back to the top


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.

↑ Back to the top


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 "Symptoms" section of this article, the query should read as follows:
Update DISTINCTROW table name
Set firstname='::firstname::'
Where ID=::ID::
Note that the single quotation marks around the ID parameter are removed.

↑ Back to the top


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

↑ Back to the top


Keywords: KB265166, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 265166
Revision : 2
Created on : 8/6/2002
Published on : 8/6/2002
Exists online : False
Views : 264