Why do I get an error "Too few Parameters. Expected 2" when I run a query in the Database Toolbox 3.5.1 (R2009a)?
9 views (last 30 days)
Show older comments
When I execute the following query
SELECT ALL column-name FROM tablename
I obtain the following error:
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
However, I am able to run the same query on other columns of the same table in the database.
Accepted Answer
MathWorks Support Team
on 31 Jul 2009
This error is obtained because the column names being selected have special characters. If there are special characters in the column names of the database, the name should be surrounded with brackets in the SQL query. The query should be executed as shown below:
SELECT ALL [column-name] FROM tablename
0 Comments
More Answers (0)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!