none
System.Data.SqlClient.SqlException: Could not find stored procedure 'get_ProjectPlan'. RRS feed

  • Question

  • Hello ppl,

     

    I have written stored proc in server and calling the same from the code ,,, but i am getting the following error???

     

    Any help would be appreciated .....

    Server Error in '/adminapp' Application.

    Could not find stored procedure 'get_ProjectPlan'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Could not find stored procedure 'get_ProjectPlan'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SqlException (0x80131904): Could not find stored procedure 'get_ProjectPlan'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
       System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
       System.Data.SqlClient.SqlDataReader.get_MetaData() +62
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
       System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
       System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +141
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
       System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92
       System.Web.UI.WebControls.ListControl.PerformSelect() +31
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26
       System.Web.UI.WebControls.CheckBoxList.OnPreRender(EventArgs e) +18
       System.Web.UI.Control.PreRenderRecursiveInternal() +86
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
    

    Tuesday, July 8, 2008 7:44 PM

Answers

  • Thanks Nissim. Thanks for ur helpful suggestion.

    Solved the error. Its related to Database permission not given for the user to add stored procedure.


    Friday, July 11, 2008 1:32 PM

All replies

  • The error comes from SQL Server. It means that the server failed to find the procedure with name 'get_ProjectPlan'

     

    There might be several reasons for that:

    * typo in code or on the server - double-check that the name on the server matches exactly the name you call

    * double-check that the data source is set to the right server

    * double-check that the database name is specified, aka either it is set in the connection string or it is set by calling ChangeDatabase method on SqlConnection. Refer to MSDN for more details...

     

    Let me know if you have more questions.

     

    Regards,

     Nissim

     

     

    Wednesday, July 9, 2008 7:43 AM
    Moderator
  • Thanks for the response.

     

    But, I checked everything you've mentioned , still its the same.

     

    Connection string, name of the stored proc Im calling are all perfectly correct. This is too weird...

     

    The stored proc is executing fine within DB. But, only from my server its not connecting to the client.

     

    Any other suggestions!!!!

    Wednesday, July 9, 2008 1:50 PM
  •  

    Run the SQL Profiler on the server and see the exact string and other details in its trace.

    * run the SQL Profiler (Microsoft SQL Server => Performance Tools => Profiler...)

    * connect to your server\instance and open the trace window

    * connect the ASP.Net client until it fails

    * select the relevant trace line, save it to file (right-click on it => Extract event data)

             - if you do not see any relevant traces, it looks like the ASP.Net client is connected to the wrong server...

    * in SQL Management studio, re-run the same sql lines - see if it fails too. If it fails, you will have better chance to spot the issue

     

     

    If this does not help, send us more details:

    * SQL server version

    * Database name

    * ASP.Net code that fails, including the connection string.

     

    Please remember to replace the username/password and other sensitive info in the code and in the connection string with stars or something else.

    Wednesday, July 9, 2008 11:52 PM
    Moderator
  • Thanks Nissim. Thanks for ur helpful suggestion.

    Solved the error. Its related to Database permission not given for the user to add stored procedure.


    Friday, July 11, 2008 1:32 PM
  • Hello,

    I have similar problem:

    System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure 'proc_ECM_CleanupChangeLog'.

    ConnectionString: 'Data Source=SQLServer;Initial Catalog=Sharepoint_Managed_Metadata;Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15'

    I thing it's related to Managed Metadata service application in SharePoint but in database of this service application doesn't exist any stored procesure with this name.

    Do you have som advice?

    Thanks

    Thursday, December 8, 2016 12:18 PM
  • Hello everyone, I think I have something that will help you out.

    I found that if you open SSMS and go to the instance's security, you will need to click on the user's login properties and then go to User Mappings.  In that, you can see that any database that you want that user to have access to, you can give the user different roles on that database.  If you had just checked them all, you would have checked two different "deny" type properties.  When you do that, you will get the exception about it not being able to find any stored procs your code tries to look up.
    Tuesday, May 21, 2019 1:40 PM