Gee, I suppose after you get the logon of a user, you can execute the stored
procedure to switch to the application role. Once you execute that stored
procedure, then all permissions that the user has will be limited to the
application role (security group).
However, if your code makes its own connections, and those additional
connections require the user to log on, then likely that connection will NOT
be aware, or even work with approle that been set. (you would have to set it
again). This is certainly the case with ADO connections. Hum, I don't know
if this applies to linked tables.
However, you could simply ask in the sql newsgroup. The only info you need
is what happens when another table is opened via odbc with the same user
name/password as the first connection that had a sp_setapprole command
executed.
On the other hand, why not link two table to sql sever. Execute a stored
procedure to set the approle and see if permissions stick to the applrole or
not. If they stick, then you have no problems.
I not aware that there is any other way to use approle other then setting
it? I have never used approle, and thus I don't know if simply setting the
user to a approle will stick for the session (for each table opened).