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

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.
DarebearAsked:
Who is Participating?
 
NetminderCommented:
User resolved; closed, 500 points refunded.

Netminder
Site Admin
0
 
David LeeCommented:
I don't understand what you mean by "application role".  Can you explain?
0
 
DarebearAuthor Commented:
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
 
DarebearAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.