Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I am tired of removing this error.
 
Project is working fine in Local host problem occurs when i upload it on Go Daddy :
 
It says :
 
 
Server Error in '/' Application.
Could not find stored procedure 'ShowHierarchyForum'.
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 'ShowHierarchyForum'.
 
Source Error:
 
Line 68:             sqlCommand.Parameters.Add(newSqlParam2);
Line 69:             sqlCommand.Connection = mycon;
Line 70:             SqlDataReader myr = (sqlCommand.ExecuteReader(CommandBehavior.CloseConnection));
Line 71:             return myr;
Line 72:                 
 

Source File: d:\hosting\9361748\html\App_Code\classes\clsDataAccess.cs    Line: 70
 
Stack Trace:
 
[SqlException (0x80131904): Could not find stored procedure 'ShowHierarchyForum'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1953274
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +96
   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) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +70
   JumpyForum.clsDataAccess.getForumData(Int32 ArticleId) in d:\hosting\9361748\html\App_Code\classes\clsDataAccess.cs:70
   JumpyForum.Forum.LoadData() in d:\hosting\9361748\html\Forum.aspx.cs:95
   JumpyForum.Forum.Page_Load(Object sender, EventArgs e) in d:\hosting\9361748\html\Forum.aspx.cs:74
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
 

Version Information: Microsoft .NET Framework Version:2.0.50727.4223; ASP.NET Version:2.0.50727.4223 
Posted 7-Jun-12 19:32pm
Pr!y@1.1K
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The error message is clear, the SP ShowHierarchyForum is missing on the server. Just create it there.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

System.Data.SqlClient.SqlException: Could not find stored procedure 'ShowHierarchyForum'.
Well, error says directly what issue it is facing. Your uploaded code failed in finding the stored procedure named 'ShowHierarchyForum' to the database connected.
 
So, just make sure that the connection string is correct in your config file and you are connecting to right database.
  Permalink  
Comments
Harshit Raj Singh at 11-Jun-12 23:23pm
   
I have checked "Connection String" is correct
Sandeep Mewara at 12-Jun-12 1:42am
   
If you are connecting to right database then verify that the SP is present in the referenced database.
Harshit Raj Singh at 12-Jun-12 4:04am
   
Thanks Sir, You are always help full ....!!! :)
Sandeep Mewara at 12-Jun-12 4:39am
   
Welcome.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

The error comes from SQL Server.
It means that the server failed to find the procedure with name 'ShowHierarchyForum'
 
There might be several reasons for that:
 
* typo in code or on the server - check that the name on the server matches exactly the name you call
 
* check that the data source is set to the right server
 
* check that the database name is specified, either it is set in the connection string or it is set by calling ChangeDatabase method on SqlConnection.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 431
1 Afzaal Ahmad Zeeshan 184
2 /\jmot 176
3 Sergey Alexandrovich Kryukov 175
4 Marcin Kozub 175
0 OriginalGriff 8,344
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,634
3 Maciej Los 5,024
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 8 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100