473,765 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automatical table update within a database

Hello!

We are developping a project using MS-SQLServer 7 and we need a
process for the synchronization of 3 tables together.
Inserts and updates in the table A should immediately and
automatically occur on table C, and updates on table C should also
automatically occur on table B.
We think that the solution using triggers and stored procedures is the
right choice. Could someone with knowledge on stored procedures help
us?
We need the help soon, this is quite urgent, so we’d be happy to
get an answer!
If something is not clear just ask!

Thanks in advance!
E. Keller
Jul 20 '05 #1
2 1565
Look at CREATE TRIGGER topic in the BOL

"E.Keller" <em************ *@net2000.ch> wrote in message
news:4e******** *************** ***@posting.goo gle.com...
Hello!

We are developping a project using MS-SQLServer 7 and we need a
process for the synchronization of 3 tables together.
Inserts and updates in the table A should immediately and
automatically occur on table C, and updates on table C should also
automatically occur on table B.
We think that the solution using triggers and stored procedures is the
right choice. Could someone with knowledge on stored procedures help
us?
We need the help soon, this is quite urgent, so we’d be happy to
get an answer!
If something is not clear just ask!

Thanks in advance!
E. Keller

Jul 20 '05 #2
Use triggers if you cannot guarantee that the process that modifies table A
will also do the other two. If you do it all with stored procedures (my
preferred method) you can write the modification code for all three tables
inside the procs. make sure you wrap the 3 statements in a transaction so
they all complete or all roll back. Triggers automatically do the
transaction for you, but this is not always a good thing.

"E.Keller" <em************ *@net2000.ch> wrote in message
news:4e******** *************** ***@posting.goo gle.com...
Hello!

We are developping a project using MS-SQLServer 7 and we need a
process for the synchronization of 3 tables together.
Inserts and updates in the table A should immediately and
automatically occur on table C, and updates on table C should also
automatically occur on table B.
We think that the solution using triggers and stored procedures is the
right choice. Could someone with knowledge on stored procedures help
us?
We need the help soon, this is quite urgent, so we’d be happy to
get an answer!
If something is not clear just ask!

Thanks in advance!
E. Keller

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2430
by: Targa | last post by:
I have an ASP scheduling application in which there are blocks of time, represented with a table, within another table which is the timeline. In other words, I have a table with a vertical timeline. Each row represents a 1/2 hour of time starting at 12 AM. The scheduled job is represented by another smaller table inside the timeline table which spans vertically the time alloted for the job. Say if the job was scheduled for 2 hours, the...
2
4304
by: J.Beaulieu | last post by:
Hi I'll have probably to use sql server soon but prior to that I have a question concerning priviledges and security. Is it possible for someone to do like in access, ie creating a db/table that is locked with a password? My guess is that it will be yes but in cas of... Now is it possible for someone to make a db/table read only rather than to lock it totally? Also can the guy who has an administrator priviledge on the server determine...
36
4656
by: toedipper | last post by:
Hello, I am designing a table of vehicle types, nothing special, just a list of unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor etc etc For the table design I am proposing a single column table with a field name called vehicle_type and this will contain the vehicle type. Sot it will be
11
14075
by: EoRaptor | last post by:
I`m exporting data from many Lotus Notes databases to a DB2 database using LotusScript. The LotusScript agents commit after EACH update/insert. Nevertheless, I keep getting transaction rollbacks on deadlock or timeout. When I get a snapshot for locks, I see that one of the export agents is getting a table lock rather than a row lock. I`m guessing this is what causes the time out. Questions: how do I determine whether it`s a deadlock or a...
5
3543
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I do the update the changed parentid in the child table fails to change. No error is given its just that the change is not written to the Database. When I step through the records for the child table the one I would expect to be changed has a row...
22
18811
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4. The system is client/server, multiusers based. The MDBs are using record locking. Here is part of the code: Dim wkSpace As Workspace, db As Database Dim rstTrans As DAO.Recordset Set wkSpace = DBEngine.Workspaces(0)
15
6722
by: l3vi | last post by:
I have a new system Im building that stores entries of what people are searching for on my sites. I want to be able to keep records of how many times a keyword was searched for daily, and from that I can calculate weekly and monthly. At this point I have one entry per search phrase with the number of hits the search phrase has gotten, and the last time it was updated. As I start to take the program out of testing and move in more...
4
3195
by: kcopson | last post by:
I need a routine to add a new field to an existing table in a database that is in another town. Situation: I maintain a database with 10 copies in different offices. Everytime we want to make a change or addition to a table's structure, someone has to physically go out to each office and make the change. Each database copy has it's own unique data, with tables links to other tables within the database, so we can't just simply send a new...
4
4997
by: wrldruler | last post by:
Hello, First, I know it's against "Access Law" to save calculations in a table, but....I want/need to. I currently have sub-totals being calculated inside a form, using DMax, DCount, and DSum. But these aggregate functions are slowing down the interface and annoying me. So I have decided not to show sub- totals on the form.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.