Re: How to Identify a User's Permissions to SQL Server Tables via VB 6.0 Application
From: Simon Hayes (sql_at_hayes.ch)
Date: 10/13/04
- Previous message: Zach Wells: "Re: securing a database deployment"
- In reply to: Brad H McCollum: "How to Identify a User's Permissions to SQL Server Tables via VB 6.0 Application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 13 Oct 2004 22:48:17 +0200
"Brad H McCollum" <bmccoll1@midsouth.rr.com> wrote in message
news:52031869.0410131014.25af0f1c@posting.google.com...
> 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 determine, through the Visual Basic interface, the
> permissions of each user that's using the application on his/her
> machine.
>
> For example, let's say I'm user "Michael" that's sitting down at my
> machine using the app. I've written. The security for logging into
> SQL Server will be setup using Windows Security (Trusted Connection)
> as opposed to Windows & SQL Server security. When Michael accesses a
> particular form in the VB 6.0 GUI, I want to run some code that
> automatically checks Michael's permission levels on the underlying
> table (actually, a stored procedure supplying the data from the table)
> that supplies the data to the form he's looking at and then give him
> some feedback on the form as to what type of permissions he has while
> he's browsing through the data shown in the form.
>
> For example, Michael opens a particular form, code in the background
> is run to identify that this is Michael accessing the form, the code
> returns a value that identifies what type of permissions he has on the
> data in the form, and a text box on the form informs Michael (for
> example) that he only has read-only permissions to the data he is
> viewing and cannot edit any of the data.
>
> As another example, user Karen sits down at her computer, logs into
> the application, opens the same form that Michael just opened, the
> code is run in VB to detect the level of permissions she has on the
> data being displayed in the form, and the text box on the form informs
> her that she has editing permissions on the data in the underlying
> table.
>
> Etc...
>
> If anyone can post an example of the code they use in accomplishing
> this task in an application they've written, I'd really appreciate a
> point in the right direction or a real-world example that's been
> implemented by one of you. I've written several apps. thus far using
> MSDE as the back-end, but the previous apps. I've written were for
> clients that didn't care about restricting access to the
> application... everyone could pretty much use the application as they
> desired and do anything they desired to the data.
>
> The current client I'm writing the app. mentioned here for wants to
> have security in place to where various users access the application
> with various levels of permissions to do stuff (or *not* do stuff) to
> the data in the application.
>
> Thanks very much in advance for any assistance / code provided!
>
> Sincerely,
> Brad McCollum
> bmccoll1@midsouth.rr.com
See my response in comp.database.ms-sqlserver - please don't multipost.
Simon
- Previous message: Zach Wells: "Re: securing a database deployment"
- In reply to: Brad H McCollum: "How to Identify a User's Permissions to SQL Server Tables via VB 6.0 Application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|