Re: Permissions!
From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 09/05/05
- Previous message: Dan Guzman: "Re: Permissions!"
- In reply to: Arpan: "Re: Permissions!"
- Next in thread: Arpan: "Re: Permissions!"
- Reply: Arpan: "Re: Permissions!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 5 Sep 2005 16:48:42 -0500
It seems you want to display different data based on the password the user
entered. In this case, you can connect using a common login (unknown to the
end user). You can then either build SQL differently depending on the
password or render data differently depending on the password. You only
need to grant SQL permissions to the application login and users won't be
able to access the data outside your application.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Arpan" <arpan_de@hotmail.com> wrote in message
news:1125952217.382925.241690@g14g2000cwa.googlegroups.com...
Sorry Dan.....forgot to ask another question.
Assume that instead of 3 users, there are, say, 100 users. Does that
mean that 100 views have to be created - one for each user? If yes,
then this means that the ASP application that will be accessing the
columns must have 100 If....Else statements with the ConnectionString
having different UIDs & Passwords something like this (assuming that
each user has to enter a password in the ASP application first before
proceeding further):
----------------------------------------
Dim strPassword
strPassword=Request.Form("pwd") 'collecting the password the user has
entered
If(strPassword="pwd1") Then
"Provider=SQLOLEDB;Server=(local);Database=ARPAN;UID=uid1;PWD=pass1"
ElseIf(strPassword="pwd2") Then
"Provider=SQLOLEDB;Server=(local);Database=ARPAN;UID=uid2;PWD=pass2"
ElseIf(strPassword="pwd3") Then
"Provider=SQLOLEDB;Server=(local);Database=ARPAN;UID=uid3;PWD=pass3"
................
................
................
End If
----------------------------------------
This will be a tedious & monotonous approach! Would you suggest some
other workaround to this?
Also the ConnectionString that uses 'Integrated Security=SSPI' doesn't
include any UserID & Password; so how will SQL Server know which user
is trying to access data & restrict data access accordingly?
Thanks once again,
Regards,
Arpan
- Previous message: Dan Guzman: "Re: Permissions!"
- In reply to: Arpan: "Re: Permissions!"
- Next in thread: Arpan: "Re: Permissions!"
- Reply: Arpan: "Re: Permissions!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|