Re: How to restrict any select to a subset?



One approach would be to add a column to the target tables that would specify the User/Company that has access to the row. This could be a coded value that might mean that only a specific company has acess to the row or that several users could gain access. Of course, multiple users/row would be harder to manage concurrency as more than one user might "own" the row, so I would avoid this approach--one user per row would be manageable. When you executed the SELECT the User_Owns column would be specified in the WHERE clause.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message news:1FAAE696-F814-490C-8043-37582FCB2813@xxxxxxxxxxxxxxxx
Hi;

We are designing a web application where multiple companies can use it. We
want to give every company access to their data, and only their data. So if
both Oracle and Microsoft are using the system, only Microsoft can see the
Microsoft data and only Oracle can see the Oracle data.

But with that restriction, we want to give them access to all tables. And
for some tables determining that restriction can be indirect. For example, an
invoice record may have a FK of the company, but an invoice item record only
has a FK of the invoice.

Is there a way to restrict selects to only the rows of data a company
"owns." Or any other suggestions on how to do this? Creating a database for
each company would work - but that means creating thousands of databases on
one server and I am guessing that is inefficient???

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm



.



Relevant Pages

  • Re: ORACLE CLIENT USERS BEWARE: Bug in Query Builder breaks SQL
    ... For what it's worth, none of this surprises me; Microsoft create all kinds of "providers" based on fashions and fads of the day, the press release reads "fully supports Oracle", then they lose interest and you are stuck with something that doesn't work anymore. ... Comparing the Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET ... When trying to use the Query Builder with Oracle, queries that create INNER JOIN syntax result in an error in Query Builder when trying to generate your schemas. ...
    (microsoft.public.vsnet.general)
  • Re: Oracle Database Access via IIS 6.0 ASP Pages on Windows 2003 S
    ... communicate back through IIS to SQL*NET installed for the Oracle Client. ... Microsoft SQL Server 2000 Standard with SP3a installed on same box. ... Microsoft OLE DB Provider for ODBC Drivers error '80004005' ...
    (microsoft.public.inetserver.iis)
  • Re: Database speed issues
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Those sold by Microsoft, Oracle itself and DataDirect. ... variety of data providers, but they're all ADO.Net Data Providers. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ODBC-error ORA-12535: TNS:operation timed out when trying to connect to Oracle 9.2.0
    ... I'm trying to connect to an Oracle 9.2 database via TCP from Microsoft ... Microsoft Windows Server 2003 SP1 ... I suppose the problem to be connected with the ODBC-driver on the client ...
    (comp.databases.oracle.misc)
  • Re: User account to run WSUS under
    ... Microsoft let us specify a less privileged domain user account while ... Cris Hanna [SBS - MVP] ... MVPs do not work for Microsoft ... we couldn't specify the SQL Server instance it could ...
    (microsoft.public.windows.server.sbs)