Wednesday, March 7, 2012

Application Role with vb

I use Application role with vb.
I connect to sql server by windows authentication.
I setup each login to public role of database.
In Database , i add application role and set permission via application
role.
When VB App connect to database , it use windows authentication.
Before It connectd , i call stored procedure (sp_setapprole) to database.
It work fine except that if i use boundcolumn to control in form.
it's occure error for consequent code try to select data from table.
It warn that "permission denied".
Thanks in advanceIt's not work yet.
But i close recordset of bound column, it can select data but bound column
can not see data.
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:eH6bONNeDHA.1832@.TK2MSFTNGP09.phx.gbl...
> It may be that connection pooling is resetting the connection so you
> lose the app role security context. Assuming you're using SQLOLEDB, try
> disabling connection pooling by including ';OLE DB Services=-2' in your
> connection string. For example:
> Provider=SQLOLEDB;Data Source=MyServer;Integrated Security=SSPI;Persist
> Security Info=False;;OLE DB Services=-2
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> SQL FAQ links (courtesy Neil Pike):
> http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> http://www.sqlserverfaq.com
> http://www.mssqlserver.com/faq
> --
> "ton" <barameek@.inglife.co.th> wrote in message
> news:e5ydwCNeDHA.3204@.TK2MSFTNGP11.phx.gbl...
> > I use Application role with vb.
> > I connect to sql server by windows authentication.
> > I setup each login to public role of database.
> > In Database , i add application role and set permission via
> application
> > role.
> > When VB App connect to database , it use windows authentication.
> > Before It connectd , i call stored procedure (sp_setapprole) to
> database.
> > It work fine except that if i use boundcolumn to control in form.
> > it's occure error for consequent code try to select data from table.
> > It warn that "permission denied".
> >
> > Thanks in advance
> >
> >
> >
>

No comments:

Post a Comment