Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL application roles.
Message
From
11/10/2001 14:42:29
 
 
To
11/10/2001 14:07:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00567136
Message ID:
00567160
Views:
12
>Have any of you guys used application roles in SQL server 7. I have set up an application role, but how do I access it through Fox ODBC. Each time I set up the ODBC and enter the a roles name and password I get a login error. So I have can't set ODBC up to access SQL.
>
>If anyone has done this, please let me know!!!

Once you are connected to SQL (using an ordinary user), you have to issue a call to SP_SetAppRole using SPT. It is valid only for the current connection, so if you are using views, make sure they share the same connection and that there is always one open view. You'll also have to get the connection number since you can't tell the views to use an existing connection that was made using SQLConnect().

This means that you must first connect with another valid login, and that login must have access to the database.

We eventually dropped the use of an application role because you can't access another database once the role has been set (for example, you can't SELECT * FROM otherdatabase.dbo.table), and we needed that functionnality.

I think you might as well set up a "normal" account and use that, as we did.
Sylvain Demers
Previous
Reply
Map
View

Click here to load this message in the networking platform