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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with connection to MS SQL db!! 1

Status
Not open for further replies.

passs

Programmer
Dec 29, 2003
170
RU
Hello!
Can somebody help me?
I'm using C# and trying to connect to one data base which is on the same computer with IIS.
Here is mistake message:

SELECT permission denied on object 'tblUsers', database 'banking', owner 'dbo'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SELECT permission denied on object 'tblUsers', database 'banking', owner 'dbo'.

Source Error:


Line 29: private void Page_Load(object sender, System.EventArgs e)
Line 30: {
Line 31: sqlDataAdapter1.Fill(DataSet1);
Line 32: DataGrid1.DataBind();
Line 33: }

what doest it mean? And how have i to fight with this problem?

Will be very thankful for any help!

Best regards!

Alexander
 
Not to be obvious, but it means that you don't have select permission on the table you're trying to select from as the user you're connecting to SQL Server with.

You can check permissions on the table with enterprise manager. Select the table, then Action->All Tasks->Manager Permissions. You'll probably find that nothing is checked for [tt]public[/tt] (anyone) or the user you're connecting as.
 
Hey, Rosenk!

You're right, that was the reason of fail connection!

Thank you! You're the best!
I thought that i just have to add some user to that data base, but even didn't know about permission manager. Thanks!

Best regards!
Alexander
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top