Re: What's wrong with this trigger



I meant to say "SET NOCOUNT ON"...

<mh> wrote in message news:%23C$KlZyTFHA.336@xxxxxxxxxxxxxxxxxxxxxxx
>I have a problem that I think might be related to this, where I have an
>update trigger that inserts an audit row into a view. It works fine from
>SQL Server Enterprise Manager, but when I go into the table through the
>ADP, it gives me the error 'Key column information is insufficient or
>incorrect. Too many rows were affected by update.' I tried the trick of
>SET NOCOUNT OFF and caching the identity, however I am still receiving the
>same error. Not sure what else to try! The primary key is in fact an
>identity and so is the view that I'm inserting the audit row into.
>
> Any help you can provide would be greatly appreciated!
> MH
>
> "Jeff via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxx> wrote in message
> news:468ab38d96a242479d01dd4ab0790c3a@xxxxxxxxxxxxxxxxxxxx
>> It only occurs when the tigger is enables. I can't seem to get the
>> EXECUTE
>> command to work though.
>>
>> EXECUTE (N'SELECT Identity (Int, ' + Cast(@myID As Varchar(10)) + ' , 1)
>> AS
>> id
>> INTO #Tmp'
>>
>> What exactly does this do?
>>
>> --
>> Message posted via http://www.accessmonster.com
>
>


.



Relevant Pages

  • Re: Whats wrong with this trigger
    ... SET NOCOUNT OFF ... >>identity and so is the view that I'm inserting the audit row into. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Whats wrong with this trigger
    ... update trigger that inserts an audit row into a view. ... it gives me the error 'Key column information is insufficient or incorrect. ... I tried the trick of SET NOCOUNT ...
    (microsoft.public.access.adp.sqlserver)

Loading