Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2004-04-29
6
153 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

828 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