参数指定其中一个数据库名称是需要。Parameter specified where a database name is required. (错误 3217)(Error 3217)

适用于: Access 2013 | Access 2016Applies to: Access 2013 | Access 2016

创建指定了无效参数类型参数查询。You created a parameter query that specifies an invalid parameter type. 下面的示例产生此错误:The following example produces this error:

PARAMETERS Param1 Text;

SELECT CustomerID
FROM Customers IN Param1;

Param1是文本参数,但 FROM 子句需要数据库参数。Param1 is a text parameter, but the FROM clause requires a database parameter. 请将参数类型从 Text 更改为 Database,然后再次尝试该操作。Change the parameter type from Text to Database, and then try the operation again.

另请参阅See also