Solved

VB.net SQL multi tennancy

Posted on 2013-01-10
3
218 Views
Last Modified: 2013-01-14
Hi

I have an online SQL database that I interact with via my VB.net Excel Add-in.
We are about to set up multiple Companies on the same database tables so each entry has a
specific company ID. How do I stop one company from see data entered by another company.
Is this multi tennancy? Not sure.....
0
Comment
Question by:murbro
3 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 38762118
How are you allowing them to view the data?  Standard procedure would be to qualify all 'SELECT' statements with "WHERE companyID = 'theirCID' " so it only returned data for their company.
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 250 total points
ID: 38762125
IF camoanys viewing the data from Vb.net application only then you can restict them through code only
means you need put Company_id='xxx' in evry query you fired , and xxx will be comapny id who ever is accessing it.
you need to provide login functionality for companiesss ,validate it and then allow ccess to application
and put this company_id in session
0
 

Author Closing Comment

by:murbro
ID: 38773624
Thanks very much for the validation. I''ve been using CompanyID for the last few months
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question