Write conflict in ADP on updating table including triggers

  • Thread starter Thread starter Lxocram
  • Start date Start date
L

Lxocram

Summary of the problems surrounding ADP SQL and TRIGGERS

Every trigger starts with

AS
SET NOCOUNT on
DECLARE @identity int, @strsql varchar(128)
SET @identity=@@identity

And ends with

SET @strsql='select identity (int, ' + cast(@identity as varchar(10))
+ ', 1) as id into #tmp'
EXECUTE(@strsql)
SET NOCOUNT OFF

Other possibilities of failure too look into:
*Updatability issues (mainly on views, best way is too work directly
on tables where possible)
http://msdn2.microsoft.com/en-us/library/bb188204.aspx#optaccsql_topic3
*Does your table contain bit values? make them non-nullable and give
them a default value
 
what's your point

do you know how to write triggers?
I don't see this crap that you're talking about having to do anything with
triggers

do you kow how to write TSQL?

what are you really trying to do?

using a trigger like this won't ever work for mulitple records at a time,
for example
 
every note that gunny is a stupid MDB crybaby


'69 Camaro said:
Everyone please note that Aaron Kem.pf is attempting to impersonate one
of our regular posters again. Tom would never post such a message.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
You only need to perform the @@identity trick where the trigger inserts
record(s) into a table with an identity field. Furthermore, the @@identity
trick doesn't resolve write conflicts, it simply ensures that the bound form
displays the correct record after an insert.

Does this happen on just one table? If so, what exactly do the triggers on
that table do? Is there a timestamp column on the table?
 
Back
Top