Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0001833: ASE 12.5 create triggers in a multi-statement fails
  • Loading branch information
chenson42 committed Jul 29, 2014
1 parent e5c63be commit a745406
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -85,7 +85,7 @@ public AseTriggerTemplate(ISymmetricDialect symmetricDialect) {
" while @@sqlstatus = 0 begin \n" +
" insert into $(defaultCatalog)$(defaultSchema)$(prefixName)_data (table_name, event_type, trigger_hist_id, row_data, channel_id, transaction_id, source_node_id, external_data, create_time) \n" +
" values('$(targetTableName)','I', $(triggerHistoryId), @DataRow, @ChannelId, @txid, @clientname, $(externalSelect), getdate()) \n" +
" fetch DataCursor into @DataRow $(newKeyVariables) \n" +
" fetch DataCursor into @DataRow $(newKeyVariables), @ChannelId \n" +
" end \n" +
" close DataCursor \n" +
" deallocate cursor DataCursor \n" +
Expand Down Expand Up @@ -127,7 +127,7 @@ public AseTriggerTemplate(ISymmetricDialect symmetricDialect) {
" while @@sqlstatus = 0 begin \n" +
" insert into $(defaultCatalog)$(defaultSchema)$(prefixName)_data (table_name, event_type, trigger_hist_id, row_data, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time) \n" +
" values('$(targetTableName)','U', $(triggerHistoryId), @DataRow, @OldPk, @OldDataRow, @ChannelId, @txid, @clientname, $(externalSelect), getdate())\n" +
" fetch DataCursor into @DataRow, @OldPk, @OldDataRow $(oldKeyVariables) $(newKeyVariables) \n" +
" fetch DataCursor into @DataRow, @OldPk, @OldDataRow $(oldKeyVariables) $(newKeyVariables), @ChannelId \n" +
" end \n" +
" close DataCursor \n" +
" deallocate cursor DataCursor \n" +
Expand Down Expand Up @@ -161,7 +161,7 @@ public AseTriggerTemplate(ISymmetricDialect symmetricDialect) {
" while @@sqlstatus = 0 begin \n" +
" insert into $(defaultCatalog)$(defaultSchema)$(prefixName)_data (table_name, event_type, trigger_hist_id, pk_data, old_data, channel_id, transaction_id, source_node_id, external_data, create_time) \n" +
" values('$(targetTableName)','D', $(triggerHistoryId), @OldPk, @OldDataRow, @ChannelId, @txid, @clientname, $(externalSelect), getdate())\n" +
" fetch DataCursor into @OldPk,@OldDataRow $(oldKeyVariables) \n" +
" fetch DataCursor into @OldPk,@OldDataRow $(oldKeyVariables), @ChannelId \n" +
" end \n" +
" close DataCursor \n" +
" deallocate cursor DataCursor \n" +
Expand Down

0 comments on commit a745406

Please sign in to comment.