Charles Adriano - Brazil Guest
|
Posted: Sat Mar 05, 2005 1:42 pm Post subject: Re: problem with triggers.... |
|
|
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...
|
|
|