Solved

VB.net SQL multi tennancy

Posted on 2013-01-10
3
213 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 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks very much for the validation. I''ve been using CompanyID for the last few months
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now