Aykut Canturk
3/27/2007 8:07:00 PM
I need to write a trigger that updates every record inserted to database.
this trigger will update only one field lets say 'branchofficename' field in
table. But in my VB application, that uses that database and that table, I
need to declare a database-wide parameter, lets'say Branch_Office_Name. so
it this sould work like that way:
In newyork office my application should do this:
On starting of my Vb application: set database.Branch_Office_Name =
"NewYork"
and trigger should do: update every record inserted, setbranchofficename =
'NewYork'
on oregon office, same applicatipn and same triggers. but parameter will
change:
On starting of my Vb application: set database.Branch_Office_Name =
"Oregon"
and trigger should do: update every record inserted, setbranchofficename =
'Oregon'
My aim is: I need to seperate records of each branch office, but also, all
of these records must have stored in one central database. (don't ask why,
thats customer choice)
Any idea howto do this ? I searched the net to find a kind of global
variable decleration in sql server and ADO but couldn't reach any
solution...
any help please ?