Microsoft KB Archive/287147

= &quot;Database Results Error&quot; error message when you update a database record in FrontPage =

Article ID: 287147

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition
 * Microsoft FrontPage 2002 Standard Edition

-



This article was previously published under Q287147





SYMPTOMS
After you use the Database Interface Wizard to create a Database Editor Web page, you may receive the following error message when you browse the page and click the Edit button:

Database Results Error

Description: [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

Number: -2147217900 (0x80040E14)

Source: Microsoft OLE DB Provider for ODBC Drivers



CAUSE
This problem can occur if a form field is using a reserved word for a field name. For example, the TimeStamp field is automatically created by FrontPage, but the word TimeStamp is a reserved name in SQL, so the SQL statement fails when it encounters this field name.



WORKAROUND
To work around this problem for the TimeStamp field, use either of the following methods:

Method 1: Rename the column in Access and rerun the Database Interface Wizard

 * 1) Start FrontPage and open your Web. Double-click the folder where your database is stored (this is FPDB by default).
 * 2) Double-click your database to open it in Access.
 * 3) Click the Results table, and then click Design view.
 * 4) Rename the TimeStamp column.
 * 5) Close the database, and then run the Database Interface Wizard again.

Method 2: Add [] to the custom SQL statement on the Update.asp page created by the Database Interface Wizard
 After you create the Database Interface pages, double-click the   folder (where  is the name of the database). Double-click Results. Double-click Editor. Double-click Update.asp. Double-click This is the start of a Database Results region.

Important A warning appears telling you not to open the Database Results Wizard. In this case, you can ignore this warning. However, be very careful to change only what you are instructed to change in this article and nothing more. After the wizard starts, click Next.</li> In step 2 of 5 in the wizard, click Edit.</li>  Near the end of the SQL statement, you will see the following section of code: Timestamp = '::Timestamp::' Add brackets ([]) around the word Timestamp. Change only the first occurrence of Timestamp, so that the code looks like this: [Timestamp] = '::Timestamp::' </li> Click OK and then click Next three times. Click Finish to return to the page.</li> Save the page and test the Database_editor.asp page.</li></ol>

<div class="resolution_section">

RESOLUTION
To resolve this issue, do not use field names that are reserved words in SQL. See the articles listed in the References section of this article for more information. You should never use these words as names for tables or fields. Also, you should not have spaces in table names. We recommend that you rename the offending tables or fields and adjust your SQL statement accordingly.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
For more information on this error message when using FrontPage and databases, click the following article number to view the article in the Microsoft Knowledge Base:

256136 &quot;Database Results Error&quot; error message when you update a database record in FrontPage

<div class="references_section">