Auto Generation of Stored Procs


Author
Message
Geoff Hirst
Geoff Hirst
StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)StrataFrame User (289 reputation)
Group: Forum Members
Posts: 123, Visits: 3.5K
Guys,

Got an issue with the DDT that came about because I wanted to change clustering on some tables to some new indexed columns. Got myself into a right state with it. However, I have discovered this and I don't know if this is by design.

In the DDT create a new table and check boxes for auto proc generation.

Add an ID, integer, not PK, but enable Identity with standard 1,1 incrementation.

Add a couple of varchar 10 columns.

Save structure, then try to deploy.

For me, it all goes south when it tries to create the sprocs for some reason it thinks the Identity column is being updated.

Now, I found a patch version of DDT on another post that looked like it might solve my issues, but I got errors when I launched it.

Any advice would be appreciated.

thanks

Geoff Hirst

Log File Extract

 20/04/2008 17:00:46 -> An error occurred while creating the stored procedure [dbo].[zzz_TestTable_Delete].
X 20/04/2008 17:00:46 -> SqlException       
X 20/04/2008 17:00:46 ->   Incorrect syntax near ';'.       
X 20/04/2008 17:00:46 ->        
X 20/04/2008 17:00:46 -> Source     : .Net SqlClient Data Provider       
X 20/04/2008 17:00:46 ->        
X 20/04/2008 17:00:46 -> Stack Trace:        
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()       
X 20/04/2008 17:00:46 ->    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeploySprocsOfPriority(Database parent, DatabaseInfo dbInfo, Int32 priority)       
X 20/04/2008 17:00:46 ->        
X 20/04/2008 17:00:46 -> An error occurred while creating the stored procedure [dbo].[zzz_TestTable_Update].
X 20/04/2008 17:00:46 -> SqlException       
X 20/04/2008 17:00:46 ->   Cannot update identity column 'ID'.       
X 20/04/2008 17:00:46 ->        
X 20/04/2008 17:00:46 -> Source     : .Net SqlClient Data Provider       
X 20/04/2008 17:00:46 ->        
X 20/04/2008 17:00:46 -> Stack Trace:        
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)       
X 20/04/2008 17:00:46 ->    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()       
X 20/04/2008 17:00:46 ->    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeploySprocsOfPriority(Database parent, DatabaseInfo dbInfo, Int32 priority)       
X 20/04/2008 17:00:46 ->        

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