Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jsdude99
Starting Member
8 Posts |
Posted - 2008-05-09 : 02:13:07
|
| I am using SqlDataSource in ASP.NET 2.0 (VS2005) application. I can use both stored procedures and in-line SQL statements within the development environment and everything works perfectly. However, when I publish the web site, only the stored procedures work and in-line SQL statements give 'Permission Denied' error. The error line reads as:System.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'Contacts', database 'Homer', schema 'dbo'.Really appreciate any help... |
|
|
pootle_flump
1064 Posts |
Posted - 2008-05-09 : 08:12:15
|
That's because you have not granted select permissions to the object for the login. The error message is pretty straight forward on this one . Personally I would use nothing but sprocs then you don't need to grant access to the user tables (assuming you use no dynamic SQL). |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-05-12 : 03:55:35
|
| Asked and answered[url]http://www.sqlservercentral.com/Forums/Topic497594-359-1.aspx[/url]--Gail Shaw |
 |
|
|
|
|
|