September 15, 2009 at 6:58 am
Hi All,
I am using Application roles for connecting to SQL Server 2005 Database from my application. The application uses Windows Authentication.
In the applciation i execute an SQL Query which will create a temporary table, then insert records into the temp table and then select the records from the temp table and then drops the temp table.
The above query is executed fine. But any query executed after this query will throw an error showing the user doesnt have enough permission. But the application role is having all the permissions.
Please help.
September 15, 2009 at 10:01 am
You are missing some information here.
When do you execute the application role? You need to run a stored proc to invoke this. I believe that the temp table will not transfer rights if you create it before you invoke the application role.
September 15, 2009 at 10:52 am
This is what i do from my VB 6 application
1. Login to the DB using Windows Authentication (Role is public)
2. Execute the sp for setting the application role
3. Executes a query which does the following
a. Creates a temporary table
b. Insert Records to it
c. Selects Records from it
d. Drops the table
4. Executes another query which selects records from any other table.
In step 4 mentioned above i am getting an error like select permission is not there for the user. But if i execute step 4 after step 2, then it will return records without any errors.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply