Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Application Roles

Status
Not open for further replies.

jobyk

Programmer
Jun 24, 2001
19
IN
Hi Friends

I am trying to use application role based priviliges to my users. After connecting to the database (SQL) through windows authentication, I have set the application role by executing the sp_setapprole stored procedure. I am getting rights for executing a query for once. When I am running a second query it returns an error. Pl. help me.
Thanks in advance.

Joby
 
mycon.open Provider=SQLOLEDB.1;Integrated Security=SSPI;OLE DB Services = -2;Persist
Security Info=False;Initial Catalog=Products;Data Source=local
mycon.execute "sp_setapprole 'productrole','password'"
set rs=mycon.execute("select * from product")
set rs1=mycon.execute("select * from product")


The first query works fine. Second query returns authentication error.

Product role is an application role which gives rights on product table.

Thanks in advance
Joby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top