Error When Excel Spreadsheet as Dataset
I'm attempting to use an Excel spreadsheet as a dataset. It appears SSRS is reading the sheet fine: the fields are coming into the dataset fine when I view the dataset in the design pane. When I try to run the report, I get the following error:
ERROR [07002][Microsoft][ODBC Excel Driver] Too few parameters. Expected 1.
I'm using a simple ODBC connection to connect to the spreadsheet.
Has anyone een this? I have no idea what this is even referring to...
Thanks in advance!!
A. M. Robinson
October 1st, 2012 12:17pm
Are you by any chance using @ParamterName for parameters? If so, try using ? instead. Something like below.
SELECT *
FROM [ExcelSheet1$] WHERE column1 <> ?
Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2012 1:06pm
I'm not using any parameters at all...
Here is the query I'm using:
SELECT * FROM [Budget$] WHERE Is_Enabled = 1
A. M. Robinson
October 1st, 2012 1:10pm
Please try the below code:
SELECT * FROM [Budget$] WHERE [Is_Enabled] = 1
Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2012 1:25pm
Unfortunately, I get the same error messageA. M. Robinson
October 1st, 2012 1:27pm
Are you sure you have the column Is_Enabled in your spread sheet(the exact same name)? What happens when you try it without the WHERE clause? Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2012 1:29pm
Isn't Is_Enabled a system function/setting in Excel?
I thought it was used to denote whether or not a coulmn is "used" in Excel...A. M. Robinson
October 1st, 2012 2:21pm
You were right!!
I was using an example query I found online. Once I removed the where clause, it worked fine!A. M. Robinson
Free Windows Admin Tool Kit Click here and download it now
October 1st, 2012 2:29pm
would you mind closing this thread by marking the posts that helped you towards resolving the issue?Shahfaisal Muhammed http://shahfaisalmuhammed.blogspot.com
October 1st, 2012 2:32pm