Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
wiltech
Yak Posting Veteran
51 Posts |
Posted - 2003-05-07 : 15:37:30
|
I am woring on an application to synchronize data from a SQL2000 database to QuickBooks company file. I am pushing the data from SQL into the QB file. In order to see when a customer record has changed in SQL I added a trigget to the customer table like:quote: CREATE TRIGGER tLastUpdateSchool ON [dbo].[Customer] FOR INSERT, UPDATEASUPDATE CustomerSET LastUpdate = getdate()WHERE CustomerID in (SELECT CustomerID FROM Inserted)
The QB Synch only occurs against the Publisher, so I only need to know when the record has been updated on it. I really don't care when the update was made on the subscriber, because it may be days before that subscriber connects back to the publisher.I looked at the Not For Replication option for the trigger, but I'm don't think that will get me what I need.Anyone have any thoughts on this ?ThanksTony WEdited by - wiltech on 05/07/2003 15:38:41 |
|
|
Tim
Starting Member
392 Posts |
Posted - 2003-05-13 : 20:49:29
|
| I am not clear what you are trying to do...If you have replication then it should be handling which records have changed. Why make your own trigger.Perhaps you can give more detailed explanation? |
 |
|
|
wiltech
Yak Posting Veteran
51 Posts |
Posted - 2003-05-13 : 22:04:26
|
quote: I am not clear what you are trying to do...If you have replication then it should be handling which records have changed. Why make your own trigger.Perhaps you can give more detailed explanation?
ok, I'll try.The "synchronization" with QuickBooks is done via a VB application that is manually ran. The SQL database is replacted with 5 MSDE clients. In order to avoid having to "synchronize" all of the cutomers between SQL and QuickBooks, I only want to update the ones that have changed since the last time the QB synch has run.So what I need to know is that last time that a record has been updated on the publisher.I'm afraid that If I create that trigger, that it will create a "circular" loop (for lack of a better term). Would it be possible to have that trigger just on the publisher?Please forgive me, as I'm not familiar with the whole replication process.ThanksTony W |
 |
|
|
wiltech
Yak Posting Veteran
51 Posts |
Posted - 2003-10-22 : 15:57:26
|
| Does anyone else have any comments or questions on this ?ThanksTony W |
 |
|
|
|
|
|