Designer Error "Could not find stored procedure 'stp_boSYC'"


Author
Message
Peter Denton
Peter Denton
StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)
Group: Forum Members
Posts: 77, Visits: 787
G'day

I have a problem when I open forms in the Designer, it gives me the error "Could not find stored procedure 'stp_SYC'". This started with one form and now it occurs on each form I try to open. I haven't made any big changes in the solution or the environement recently. The form I originally had problems with contains 17 BOs each based on our BOMaintBase, and there is an instance of this error (and call stack) for each of these BOs.


at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
at MicroFour.StrataFrame.Data.DbDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
at MicroFour.StrataFrame.Data.SqlDataSourceItem.GetDataTable(DbCommand Command, OnChangeEventHandler CallBack)
at MicroFour.StrataFrame.Data.DbDataSourceItem.ExecuteStoredProcedure(String SprocName, DbCommandExecutionType ExecutionType, DbParameter[] Parameters)
at MicroFour.StrataFrame.Business.BusinessLayer.FillByStoredProcedure(String ProcedureName, DbParameter[] Parameters)
at UtilRunTimeEnvironment.boSYCforRunTimeEnv.FillBO() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilRunTimeEnvironment\boSYCForRunTimeEnv.vb:line 84
at UtilRunTimeEnvironment.boSYCforRunTimeEnv.AddHandlers() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilRunTimeEnvironment\boSYCForRunTimeEnv.vb:line 74
at UtilRunTimeEnvironment.boSYCforRunTimeEnv..ctor() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilRunTimeEnvironment\boSYCForRunTimeEnv.vb:line 31
at UtilRunTimeEnvironment.clsRunTimeEnv.Initialise() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilRunTimeEnvironment\clsRunTimeEnv.vb:line 127
at UtilRunTimeEnvironment.clsRunTimeEnv.get_RetriesBeforeDALLogsError() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilRunTimeEnvironment\clsRunTimeEnv.vb:line 682
at UtilBOBase.boTMSMaintBase.InitialiseRetrySettings() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilBOBase\boTMSMaintBase.vb:line 60
at UtilBOBase.boTMSMaintBase..ctor() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\UtilBOBase\boTMSMaintBase.vb:line 45
at BOProcStation.boGRS..ctor() in C:\Users\peterd\VS2005 Workspace\TMS Redevelopment\TMS\BOProcStation\boGRS.vb:line 20

The BOMaintBase references a standard strataframe BO, boRTE, that provides default runtime values for things like number of retries etc. boRTE has as its UpdateStoredProcedureName, 'stp_boSYC'. I've checked, and stp_boSYC exists in the Database I'm using.

My colleague is using the same code and the same database and is not having this problem, and in fact he can change the UpdateStoredProcedureName to 'stp_PMJ' (which doesn't exist anywhere) and still doesn't have a problem. If I make the same change I get the same error as before but with the stored procedure name changed.

There is an "Ignore and Continue" link on the designer page, and if I use this the designer looks to be completely functional.

We're using VSTS 2008 and SQL Server 2005.

Anyone have any ideas on this?

Peter

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah...you have some code someplace within your code (i.e. a constructor, OnCreateControl) that is attempting to populate the BO which should not be executed at design-time.  This is a common error when developers create a user control and drop it on a form or another user control and then try to open the designer.  The constructor gets fired in this scenario.  Just test if you are in design mode and it will resolve the error:

If Not Me.DesignMode Then
    MyBo.FillMeWithSomething()
End If

Peter Denton
Peter Denton
StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)StrataFrame Novice (109 reputation)
Group: Forum Members
Posts: 77, Visits: 787
Thanks Trent,

Thanks to your suggestion I found the problem and got around it. The If Not Me.DesignMode Then test didn't actually fix the problem which was in the constructors for our BO base, but I found other means of achieving my objective.

Peter

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Great!  Glad you found a solution. Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search