Solved

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

Posted on 2004-04-29
6
154 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
[X]
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
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

726 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