dbTalk Databases Forums  

simultaneous updations and deletions between databases

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss simultaneous updations and deletions between databases in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vishnu mahendra
 
Posts: n/a

Default simultaneous updations and deletions between databases - 07-18-2004 , 01:35 PM






hello to all,

there are two databases named A and B.
One database contains employee id as primary
I have another project database which includes that employee id as
foreign key. How can I reflect my updations,deletions

thank you in advance,
vishnu

Reply With Quote
  #2  
Old   
Yura
 
Posts: n/a

Default Re: simultaneous updations and deletions between databases - 07-18-2004 , 03:11 PM






You can use triggers on both databases
IMHO - Best way



Reply With Quote
  #3  
Old   
John Bell
 
Posts: n/a

Default Re: simultaneous updations and deletions between databases - 07-18-2004 , 03:17 PM



Hi

If you have two databases then you can not have a FK defined between the
two. At a guess you actully have two tables with a FK defined between them.
To reflect changes to the referenced table in the referencing table then use
the cascade options on the FK. If you are using CREATE TABLE statements to
create the FKs then use the ON DELETE CASCADE, to reflect updates to the
referenced keys use ON UPDATE CASCADE. If you are using the diagramming tool
in SQL Server Enterprise Manager check the cascade update related fields and
cascade delete related records on the relationships tab.

John




"vishnu mahendra" <vishnu_mahendra (AT) yahoo (DOT) com> wrote

Quote:
hello to all,

there are two databases named A and B.
One database contains employee id as primary
I have another project database which includes that employee id as
foreign key. How can I reflect my updations,deletions

thank you in advance,
vishnu



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.