Solved

Can you apply the Applications role to a connection made my a ADODC control

Posted on 2004-04-29
6
150 Views
Last Modified: 2010-05-02
Is there a way to apply the application role to the connection made by a ADODC control.

Unfortunately the work required to remove the ADODC controls would be extensive.
0
Comment
Question by:Darebear
  • 2
6 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 10954145
I don't understand what you mean by "application role".  Can you explain?
0
 

Author Comment

by:Darebear
ID: 10959332
I am referring to the SQL server application Role. We don't want users to be able to log into our database using Query analyzer or MS Access etc.. They should only be able to modify data using our application. This can be done through the use of a SQL server application role. However it appears the ADODC controls create there own connections and as such we need to apply the application role to that connection also. If we don't then the Control has no rights and can't get any data.

We are using the following command to set the application role for our regular connections.

cnData.Execute ("exec sp_setapprole 'Application', 'application'")
0
 

Author Comment

by:Darebear
ID: 10960172
Okay I have figured it out! The following appears to work so far.

cndata.RecordSource = "select * from Table go exec sp_setapprole 'Application', 'application'"
cndata.refresh

This command runs fine and the refresh works my data now appears with the application role nicely locking down the system.

thanks.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11273911
User resolved; closed, 500 points refunded.

Netminder
Site Admin
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

760 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

24 Experts available now in Live!

Get 1:1 Help Now