VB.net SQL multi tennancy

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.....
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
Pratima PharandeConnect With a Mentor Commented:
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
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
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
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much for the validation. I''ve been using CompanyID for the last few months
0
All Courses

From novice to tech pro — start learning today.