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



The information in this article applies to:

  • Microsoft FrontPage 2000

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 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.

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 "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.

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


Modification Type:MajorLast Reviewed:8/6/2002
Keywords:kberrmsg kbprb KB265166