L
Lastie
Hi all,
I’m an ASP developer but I just started to try and learn ASP.NET. I have
the following code but it seems like I have a permissions problem.
<%@ Page Language="VB" Debug="true" %>
<%@ import namespace="System.Data" %>
<%@ import namespace="System.Data.SqlClient" %>
<%
Dim connWebLinks As New SqlConnection("Data Source=(local);Initial
Catalog=dbWebLinks;Integrated Security=SSPI")
Dim Cmd As New SqlCommand("SELECT * FROM tblLinks", connWebLinks)
connWebLinks.Open
Dim myReader = Cmd.ExecuteReader()
myReader.Close
connWebLinks.Close
%>
I get this error:
System.Data.SqlClient.SqlException: SELECT permission denied on object
'tblLinks', database 'dbWebLinks', owner 'dbo'.
I have added <computer name>\ASPNET to the ‘users’ for the database
‘dbWeblinks’ in SQL Server and given it all the permissions I can see, this
includes SELECT on the table ‘tblWeblinks’.
Can anyone help me?
Thanks,
Steve
I’m an ASP developer but I just started to try and learn ASP.NET. I have
the following code but it seems like I have a permissions problem.
<%@ Page Language="VB" Debug="true" %>
<%@ import namespace="System.Data" %>
<%@ import namespace="System.Data.SqlClient" %>
<%
Dim connWebLinks As New SqlConnection("Data Source=(local);Initial
Catalog=dbWebLinks;Integrated Security=SSPI")
Dim Cmd As New SqlCommand("SELECT * FROM tblLinks", connWebLinks)
connWebLinks.Open
Dim myReader = Cmd.ExecuteReader()
myReader.Close
connWebLinks.Close
%>
I get this error:
System.Data.SqlClient.SqlException: SELECT permission denied on object
'tblLinks', database 'dbWebLinks', owner 'dbo'.
I have added <computer name>\ASPNET to the ‘users’ for the database
‘dbWeblinks’ in SQL Server and given it all the permissions I can see, this
includes SELECT on the table ‘tblWeblinks’.
Can anyone help me?
Thanks,
Steve