Monday, March 19, 2012

OLEDB Datasources and parameters

I have discovered some shortcomings in the way inline table valued function parameters are treated in the OLEDB datasource. You can select the user designed function ine the Generic Query Builder and test it with the required parameters. However when you attempt to set up the parameters for the result ing SQL Command Text you get and error message to the effect that the parameters cannot be retrieved from the datasource. Once again this is disappointing because Report Services seems to deal with the parameters perfectly well.

Dick Campbell

I've never had any problems using parameters in OLEDB Sources. How are you defining the placeholders for your parameters? For OLEDB they should be a single "?".
A sample SQL statement would look like the following:
Select Col1, Col2 from MyTable where MyDate between ? and ?
The first ? would map to Parameter0 and the second would map to Parameter1.
Larry Pope
|||I am using ? as you suggest but I am calling an inline table valued function. The format is "select * from function(?,?,?) as function".

No comments:

Post a Comment