Re: Edit conflicts between table and trigger



Robert,

Failing to issue SET NOCOUNT ON results in ADP's confusing the row count message as the result set. I can't put my finger on it any
better, but tahtis it in a nutshell.

Cheers,

malcolm

"Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:%23P1p2UKSGHA.2088@xxxxxxxxxxxxxxxxxxxxxxx
Hi Malcolm,

I don't use a lot of triggers, and the ones I do are mostly one-liners. Can you elaborate on the "set nocount on" issue a bit.
I'm familiar with what it does, but why is it a concern in triggers? Do I need to turn nocount off at the end, or is state
preserved after the trigger completes?

To be honest, it's been so long since I designed my triggers, that I don't even remember if I did that, or knew to do that at the
time...tomorrow I'll have to go back and check, of course. :)



Thanks,
Rob

"Malcolm Cook" <malcook@xxxxxxxxxxxxxxxx> wrote in message news:ObLa3QtQGHA.4920@xxxxxxxxxxxxxxxxxxxxxxx
Mark,

Things to try (in order):

1) make sure the trigger does a 'set nocount on' first thing
2) add a timestamp to the table
3) tell us what happens, and if it does not go way, then send the CREATE TABLE statement, the error message, the text of the
trigger
4) maybe remove any bit fields on the table (recast them as smallint)
5) ????

--
Malcolm Cook
Stowers Institute for Medical Research - Kansas City, MO USA


"Mark" <asd@xxxxxxxxx> wrote in message news:sAxPf.73411$494.17985@xxxxxxxxxxxxxxxxxxxxxxx
Hi folks

I probably shouldn't be posting this here but...

Using Access XP / MSDE

I am in the process of migrating a very complex mdb/mde to ADP. This will be a two stage process (due to urgency), the first
stage being migration of the backend and some core functionaility to MSDE/mde and the second migrating the remaining
functionality to MSDE/ade.

I have a table which has a trigger set for insert/update which modifies one of it's own values based on various conditions. The
problem is that if I try to modify a record through a linked table in an mde I get a write conflict (even though I am defitely
the only person on the database). If I edit the record through Enterprise Manager directly I don't get an error at all.

Anyone know how this can be avoided or if the error is just a symtom of something else entirely?

Many thanks

Mark







.



Relevant Pages

  • Re: Edit conflicts between table and trigger
    ... make sure the trigger does a 'set nocount on' first thing ... tell us what happens, and if it does not go way, then send the CREATE TABLE statement, the error message, the text of the trigger ... I am in the process of migrating a very complex mdb/mde to ADP. ... being migration of the backend and some core functionaility to MSDE/mde and the second migrating the remaining functionality to ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Edit conflicts between table and trigger
    ... Failing to issue SET NOCOUNT ON results in ADP's confusing the row count ... or is state preserved after the trigger ... I am in the process of migrating a very complex mdb/mde to ADP. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Whats wrong with this trigger
    ... I actually had SET NOCOUNT OFF at the top, ... >>table that has the trigger is control data, so the results that are moved ... >>would scrap the Access app at this point, but I don't have time for the ... and the app that uses this data is .NET. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: SET NOCOUNT ON - am I doing this wrong?
    ... > place it in the trigger if you also had to place it around every call ... by running a set nocount on one time when you connect to the server. ... create trigger trigtest_ins on trigtest ... exec trigtest_sp ...
    (microsoft.public.sqlserver.server)
  • Can i reuse the code in triggers??
    ... each of them has a Delete trigger ... Delete rr from ResourceRating rr ... Set NoCount Off ... W. Jordan ...
    (microsoft.public.sqlserver.programming)

Loading