FP2000: Too Few Parameters Error Previewing Page w/Database Region
ID: Q205972
|
The information in this article applies to:
SYMPTOMS
When you preview a page that contains a database region from a custom query, you may see the following error message in the Web browser:
Database Error: [Microsoft][ODBC Microsoft Access 97 Driver] Too few
parameters. Expected 1.
CAUSE
This behavior occurs when the field name you specified in your SELECT
statement does not exist in the database being queried. Most often this happens if you have mistyped the query.
RESOLUTION
To resolve this behavior, you must specify the correct field name in your
SELECT statement. To do this, follow these steps:
METHOD 1: Do not use a Custom SELECT query
Since FrontPage can detect the database tables, queries, and fields, use the FrontPage Database Results Wizard to select the proper record source and fields to include. To do this, follow these steps:
- In Page view of FrontPage, open the page with the database results region
- Delete the existing database region from the page. To do this, highlight the database region and press DELETE.
- On the Insert menu, point to Database, and click Results.
- In Step One of the wizard, select your database and click Next.
- In Step Two, click to select Record Source and select the query you want to use from the list. Click Next to complete this step
- In Step Three, you may edit the list of fields. When you are finished, click Next
- In Step Four, you may set the table properties for the database results. When you are finished, click Next .
- In Step Five, you may select to display all records together or split the records up into groups. When you are finished, click Next.
- Save the page.
METHOD 2: Verify your SELECT query
- Determine the correct field name in your database.
- Start Microsoft Access and open your database.
- Select the table you are querying, and then click Design View.
- Note the name of the field you would like to query. The field name
appears in the Field Name column.
- On the File menu, click Exit.
- Start FrontPage and open the page that contains the database
region.
- Right-click any column value in the database region and then
click Database Results Properties on the menu that appears.
- Click Next.
- In Step Two, click Edit.
- In the SELECT statement, type the name of the field you noted in step 1.
For example, if the field name is Field1, type your query similar to the following:
SELECT Field1 from TABLE
NOTE: Your query may be different depending on the name of your table
and the number of fields you are querying.
- Click Finish.
- On the File menu, click Save.
Additional query words:
front page 2000RTMPublic
Keywords : kbdta fpedit fpodbc kbDatabase kbInternet kbODBC
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 1, 1999