Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-04-29
6
Medium Priority
?
157 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 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…
Suggested Courses

618 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