I initially used "_{0}_" as custom store's format string, tried later with "sp_{0}_" and problems repeats.
I create a "Clients" table with "IdClient", "Name" and "BirthDate" columns. Then i make a custom store named "sp_Clients_Show":
SELECT *
FROM Clients
ORDER BY BirthDate
Generate templates (NetTiers 2.0.1.471) and it compiles ok. Then i remove "BirthDate" column from "Clients" table and try to regenerate again.
This is the awaited error message that appears on Codesmith generation report.
Error while execution Sql file. System.Data.SqlClient.SqlException: Invalid column name 'BirthDate'.
en System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
en System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
en System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
en System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
en System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
en System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
en System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
en MoM.Templates.CommonSqlCode.ExecuteSqlInFile(String pathToScriptFile, String connectionString)
en _CodeSmith.NetTiers_cst.Go()
But then also my custom stored procedure
"sp_Clients_Show" has been deleted from database (using SQL 2005). I have tried this several times on different situations and problem persists.