Having a little trouble with stored procedures. I created a stored procedure in the DotNetNuke db through an SQL Server project in VS2005. I successfully deployed the procedure to my database and confirmed this by viewing it in SQL Server 2005 Management Console and executing it with a query:
DECLARE @return_value int
EXEC @return_value = dbo.findUserPortal
@userName = N'oubsabo'
SELECT 'Return Value' = @return_value
Value is returned as expected and everything looks ok. That is until I try to call my stored procedure from my SqlDataProvider class.
I try to execute my stored procedure in the following manner:
Public Overrides Function findUserPortal(ByVal userName As String) As IDataReader
Return CType(SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner & ObjectQualifier & "findUserPortal", userName), IDataReader)
End Function
The result is an InvalidOperationException telling me that The stored procedure 'dbo.findUserPortal' does not exist. I find this to be rather odd considering that it in fact does exist in my database and that I can execute it through queries in the SQL Server Management Console.
I would appreciate any help, as this is driving me crazy.