473,499 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Server Users and Roles

107 New Member
We can define Users and Roles for datbases and tables in SQL server but i wonder how this can be implemented in real time applications developed in platforms like VB, VB.Net etc..

I mean when we create applications, we do create the login form to enter the application. Once a user is inside the application, he/she should be having different privieleges. Some users can only view the informations and some can add/edit/delete informations through the application. So, i wanna know how this is done?
Mar 25 '09 #1
4 1919
code green
1,726 Recognized Expert Top Contributor
Create a table in the database with user ids and their various privileges.
When a user logs on, query this table to get their current privileges into an array.
Then in the application layer control via code which pages or features they are allowed to access based on the values in the array.

Changing the DB privileges directly seems unnescessary
Mar 25 '09 #2
raamay
107 New Member
i am not sure how the prieveleges are stored in the database.
Mar 25 '09 #3
code green
1,726 Recognized Expert Top Contributor
Create a table in the database with user ids and their various privileges.
i am not sure how the prieveleges are stored in the database.
Don't worry about the correct terms for database privileges.
What I mean is a table with boolean values to indicate whether a user can
SELECT, INSERT, UPDATE, DELETE etc
ie
Expand|Select|Wrap|Line Numbers
  1. privieges_table
  2. user_id  select  insert  update  delete
  3. 001         1         1       0         0
  4. 002         1         0       0         0
  5. 003         1         1       1         1 
  6. 004         0         0       1         0
etc

You would also need an administator interface that allows only you to modify this table
Mar 25 '09 #4
ck9663
2,878 Recognized Expert Specialist
The only catch with Code Green's suggestion is that you have to connect to your DB using a common user name which might be difficult trace later on. The good part is you have more control on the application side.

If you still want to use the user name that you actually defined inside the DB, you can actually use that as parameters on your connection string.


-- CK
Mar 25 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4797
by: Noloader | last post by:
Hello, We are using Access Front End (ADP Project) and SQL Server 2000 backend. SQL Server is using NT Security. We do not want the users to access the the underlying tables. So, we went to...
1
3053
by: Brad H McCollum | last post by:
I'm writing an application using VB 6.0 as the front-end GUI, and the MSDE version of SQL Server as the back-end (it's a program for a really small # of users --- less then 3-4). I'm trying to...
1
1840
by: Kevin | last post by:
I'm interested in opinion on how to handle the user security when connecting an Access Application to a SQL server. It will be a front-end mdb installed on each user's PC, connecting to the shared...
6
1927
by: Emily Jones | last post by:
Dear All I've got a MS Access application. Split FE/BE. 9 user LAN. I'm considering moving to a server backend. Probably SQL Server, with an Access FE still. Because: 1. We've been getting...
4
5372
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
3
375
by: Sean | last post by:
HI There, I am having trouble deploying my .aspx pages to a remote server, I have made changes to the config file and it still returns an error. I have also contacted the server administrator to...
3
807
by: Niranjan Roy | last post by:
When trying to create Web application project from inside my Visual Studio.Net, I am getting the following error: --------------------------- Microsoft Development Environment ...
0
2240
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
5
1724
by: RedEye | last post by:
Hello, I am working on a test site to explore the new login controls and membership features of ASP.NET v2.0. I have tested the controls using SQL Express and have now decided to try using a...
5
5690
by: Jonathan Allen | last post by:
Is this the correct way to use application roles? Public Function GetDBConnection() As SqlConnection Dim oCon As New SqlConnection(myConnectionString) oCon.Open() Using oCmd As SqlCommand =...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.