BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: problem with triggers....

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Charles Adriano - Brazil
Guest





PostPosted: Sat Mar 05, 2005 1:42 pm    Post subject: Re: problem with triggers.... Reply with quote



NOTE : provider UpdateMode = upWhereKeyOnly and ID1(Table1) and ID2(Table2)
is a pk

charles

"Charles Adriano - Brazil" <d0002g (AT) yahoo (DOT) com.br> escribió en el mensaje
news:4229b6ad (AT) newsgroups (DOT) borland.com...
Quote:
hi all

i have D7 SQLServer2000.

2 tables
- Table1 (ID1, val)
- Table2 (ID2, ID1, Val)

Table2 have triggers
- Insert (update Val in table1)

CREATE TRIGGER [InsTable2] ON [dbo].[Table2]
FOR INSERT
AS BEGIN
UPDATE Table1 SET Table1.val = I.Val
FROM table1 P, Inserted I
WHERE (P.id1 = I.id1)
END

i have in COM+ midle tier
SQLConnection - SQLDataSet - Provider
- Provider.BeforeUpdateRecord i generate next ID2 (table2)

when i insert record show dialogreconcilie error
- Record not found or changed by another user

if i remove triggers the insert work fine
PD : in QUERY ANALIZER the insert work fine and update table1.

why?

i don't change any fiels of Table2 in trigger...
only update val in table1...

best regards

charles

PD:sorry for my english...




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.