You are here: Re: updating two tables « MsSQL Server « IT news, forums, messages
Re: updating two tables

Posted by Ed Murphy on 01/23/07 04:56

thomanjl wrote:

> I have an access program that tracks the location of certain items.
> When the items are moved their record will be added with transfer
> information.
>
> So, there are two tables: tblContents and tblTransfer
>
> tblContents holds all the relevant information about each item as well
> as a flag for transferred items and tblTransfer holds all the
> transferred item information.
>
> My problem is: How do I update tblTransfer when an item in tblContents
> gets flagged true?
>
> btw, this is using a .asp front end to interact with the database.

Define a trigger on tblContents, something like this:

create trigger trgTransfer on tblContents for insert, update as
insert into tblTriggers
select <list of fields>
from inserted
go

Since this is at the database level, it is completely independent
of the Access and .ASP layers.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация