Monday, June 10, 2013

Parameters cannot be extracted from the SQL command

Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command....."Syntax error, permission violation, or other nonspecific error".

Got this while trying to create a parameter inside an OLE DB Source Editor.

Spent an hour scouring google and couldn't find an answer to my query.

It was a simple query like:

/****     My  Awesome Query     ****/

Select blah1, blah2, blah3
from myblahtable
Where 1=? and myblahdate > ?

Then BAM "Syntax error, permission violation, or other nonspecific error".

Turns out, it was my "/****     My  Awesome Query     ****/" comment that I left in was making it to hard for the parser to find my question marks.

Ugh.

Hope this helps you.