Can't Retrieve Columns for SP with Parameters
Posted: Mon Oct 16, 2006 9:37 pm
Hi
I'm trying to retrieve colums for a SP with 3 string Parameters as follows
exec RptListInventoryItems @CompanyID, @DivisionID,@DepartmentID
we get error message:
Must declare the scalar variable "@CompanyID".
However we can fool the designer by putting quotes around the parameter names and turning them into strings:
exec RptListInventoryItems "@CompanyID", "@DivisionID","@DepartmentID"
This works - allowing us to retreive the columns.
It doesn't matter whether the strings are valid values for the SP.
Can we get around this problem somehow?
Thanks
Philip
I'm trying to retrieve colums for a SP with 3 string Parameters as follows
exec RptListInventoryItems @CompanyID, @DivisionID,@DepartmentID
we get error message:
Must declare the scalar variable "@CompanyID".
However we can fool the designer by putting quotes around the parameter names and turning them into strings:
exec RptListInventoryItems "@CompanyID", "@DivisionID","@DepartmentID"
This works - allowing us to retreive the columns.
It doesn't matter whether the strings are valid values for the SP.
Can we get around this problem somehow?
Thanks
Philip