Re: SQL7 Column-level constraints/filters possible?
From: Steve Hendricks (anonymous@devdex.com)
Date: 09/19/02
- Next message: JW: "create linked server for an SQL instance failed"
- Previous message: CSDunn: "duplicate user permissions"
- In reply to: Jeffrey L. Woods: "SQL7 Column-level constraints/filters possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Steve Hendricks <anonymous@devdex.com> Date: Wed, 18 Sep 2002 16:39:42 -0700
Jeffery,
Here's the sad news... There is not a native way to filter the data
based on the login. While the SQL server can determine the User logged
on, a trigger can only be applied to Inserts, Updates and Deletes; not
Selects.
A set of views could be developed but there would need to be one for
each table that held company specific data and the application would
need to be modified in each location in the code where one of these
tables is accessed. Further, the triggers would not be very efficient
since they would need to reference the User and at least one other table
that correlated the user to the appropriate company.
I am working with a third party application that also uses a CompanyID
value in most of the tables to distinquish data from different
companies. When you log into the application, you define the "current
company". All of the SQL scripts make use of this current company value
when retrieving data (e.g., SELECT blah, blah FROM MyTable WHERE
CompanyID = 'XYZ' and blah, blah, blah...)
You have my condolences...
Steve Hendricks, MCSD, MCDBA
shendricks@afsconsulting.com
(949) 588-9800 x15
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: JW: "create linked server for an SQL instance failed"
- Previous message: CSDunn: "duplicate user permissions"
- In reply to: Jeffrey L. Woods: "SQL7 Column-level constraints/filters possible?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|