473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

msde premission

Hei
Hi

i'm try a asp.net web page that access msde, i think these problem is about
premission.
i have

1. added a login to msde named 'Database Users' and
2. grant windows user group 'Database Users' to that login, also
3. add 'ASPNET' to windows user group 'Database Users'.

but still not work. pls help
Nov 18 '05 #1
5 1338
Does it work using the sa account? If so, then you definitely have a
permission problem.

You either need to use osql to execute statements that add/remove users
(sp_addlogin, sp_adduser, sp_grantlogin, sp_grantdbaccess, etc..) -- or get
your hands on a copy of Enterprise Manager that comes with Sql Server -- or
if you have Microsoft Access 2000 you can start a new "Project", connect to
MSDE, and you can control logins and things from the tools menu.

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access

"Hei" <ch******@msn.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
Hi

i'm try a asp.net web page that access msde, i think these problem is about premission.
i have

1. added a login to msde named 'Database Users' and
2. grant windows user group 'Database Users' to that login, also
3. add 'ASPNET' to windows user group 'Database Users'.

but still not work. pls help

Nov 18 '05 #2
Hi
What is the exactly error?
Show me the connection or the code for you example

"Hei" <ch******@msn.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
Hi

i'm try a asp.net web page that access msde, i think these problem is about premission.
i have

1. added a login to msde named 'Database Users' and
2. grant windows user group 'Database Users' to that login, also
3. add 'ASPNET' to windows user group 'Database Users'.

but still not work. pls help

Nov 18 '05 #3
Hei
i work suddenly, is it because need to restart msde
after i add login(mentioned in first post)??

"Franco Figún" <fr********@fibertel.com.ar> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
Hi
What is the exactly error?
Show me the connection or the code for you example

"Hei" <ch******@msn.com> wrote in message
news:uD**************@TK2MSFTNGP09.phx.gbl...
Hi

i'm try a asp.net web page that access msde, i think these problem is

about
premission.
i have

1. added a login to msde named 'Database Users' and
2. grant windows user group 'Database Users' to that login, also
3. add 'ASPNET' to windows user group 'Database Users'.

but still not work. pls help


Nov 18 '05 #4
Try this code, and tell me what you see:

<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<HTML>
<HEAD>
<TITLE>ADO.NET</TITLE>
</HEAD>
<BODY>
<%
Dim objConexion As SqlConnection
Dim objComando As SqlCommand
Dim objDataReader As SqlDataReader
Dim intContador As Integer

objConexion = New SqlConnection("server=PC;uid=sa;pwd=;database=nort hwind")
objConexion.Open()

objComando = New SqlCommand("Select * From categories", objConexion)
objDataReader = objComando.ExecuteReader()
%>
<%
intContador = 1
Response.Write("<TABLE
BORDER=1><TR><TD>NRO</TD><TD>ID</TD><TD>NOMBRE</TD></TR>")

While objDataReader.Read
Response.Write("<TR><TD>" & intContador & ".</TD><TD>" &
objDataReader.Item("categoryID") & "</TD><TD>" &
objDataReader.Item("categoryname") & "</TD></TR>")
intContador = intContador + 1
End While

Response.Write("</TABLE>")
objDataReader.Close()
objConexion.Close()
%>
</BODY>
</HTML>
------------------------------------------------------------------
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<script language="VB" runat="server">
Sub Page_Load(Src As Object, e As EventArgs)
Dim myConnection As SqlConnection
Dim myCommand As SqlDataAdapter
' Create a connection to the "pubs" SQL database located on the
' local computer.
myConnection = New SqlConnection("server=localhost;" _
& "database=pubs;Trusted_Connection=Yes")
' Connect to the SQL database using a SQL SELECT query to get all
' the data from the "Authors" table.
myCommand = new SqlDataAdapter("SELECT * FROM Authors", _
myConnection)
' Create and fill a DataSet.
Dim ds As DataSet = new DataSet()
myCommand.Fill(ds)
' Bind MyDataGrid to the DataSet. MyDataGrid is the
' ID for the DataGrid control in the HTML section.
MyDataGrid.DataSource = ds
MyDataGrid.DataBind()
End Sub
</script>

<body>
<h3><font face="Verdana">
Simple Select to a DataGrid Control.
</font></h3>
<ASP:DataGrid id="MyDataGrid" runat="server"
Width="700"
BackColor="#ccccff"
BorderColor="black"
ShowFooter="false"
CellPadding=3
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
EnableViewState="false"
/>
</body>
</html>
Nov 18 '05 #5
Hei
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server
connection.
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: Login failed for user
'sa'. Reason: Not associated with a trusted SQL Server connection.

Source Error:
Line 15:
Line 16: objConexion = New
SqlConnection("server=(local);uid=sa;pwd=;database =northwind")
Line 17: objConexion.Open()
Line 18:
Line 19: objComando = New SqlCommand("Select * From categories",
objConexion)
Cannot open database requested in login 'pubs'. Login fails. Login failed
for user 'WILLIAM2\ASPNET'.
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: Cannot open database
requested in login 'pubs'. Login fails. Login failed for user
'WILLIAM2\ASPNET'.

Source Error:

Line 16: ' Create and fill a DataSet.
Line 17: Dim ds As DataSet = new DataSet()
Line 18: myCommand.Fill(ds)
Line 19: ' Bind MyDataGrid to the DataSet. MyDataGrid is the
Line 20: ' ID for the DataGrid control in the HTML section

"Franco Figún" <fr********@fibertel.com.ar> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Try this code, and tell me what you see:

<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<HTML>
<HEAD>
<TITLE>ADO.NET</TITLE>
</HEAD>
<BODY>
<%
Dim objConexion As SqlConnection
Dim objComando As SqlCommand
Dim objDataReader As SqlDataReader
Dim intContador As Integer

objConexion = New SqlConnection("server=PC;uid=sa;pwd=;database=nort hwind") objConexion.Open()

objComando = New SqlCommand("Select * From categories", objConexion)
objDataReader = objComando.ExecuteReader()
%>
<%
intContador = 1
Response.Write("<TABLE
BORDER=1><TR><TD>NRO</TD><TD>ID</TD><TD>NOMBRE</TD></TR>")

While objDataReader.Read
Response.Write("<TR><TD>" & intContador & ".</TD><TD>" &
objDataReader.Item("categoryID") & "</TD><TD>" &
objDataReader.Item("categoryname") & "</TD></TR>")
intContador = intContador + 1
End While

Response.Write("</TABLE>")
objDataReader.Close()
objConexion.Close()
%>
</BODY>
</HTML>
------------------------------------------------------------------
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<script language="VB" runat="server">
Sub Page_Load(Src As Object, e As EventArgs)
Dim myConnection As SqlConnection
Dim myCommand As SqlDataAdapter
' Create a connection to the "pubs" SQL database located on the
' local computer.
myConnection = New SqlConnection("server=localhost;" _
& "database=pubs;Trusted_Connection=Yes")
' Connect to the SQL database using a SQL SELECT query to get all
' the data from the "Authors" table.
myCommand = new SqlDataAdapter("SELECT * FROM Authors", _
myConnection)
' Create and fill a DataSet.
Dim ds As DataSet = new DataSet()
myCommand.Fill(ds)
' Bind MyDataGrid to the DataSet. MyDataGrid is the
' ID for the DataGrid control in the HTML section.
MyDataGrid.DataSource = ds
MyDataGrid.DataBind()
End Sub
</script>

<body>
<h3><font face="Verdana">
Simple Select to a DataGrid Control.
</font></h3>
<ASP:DataGrid id="MyDataGrid" runat="server"
Width="700"
BackColor="#ccccff"
BorderColor="black"
ShowFooter="false"
CellPadding=3
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
EnableViewState="false"
/>
</body>
</html>

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: izzy | last post by:
I was wondering if any of you guys can kindly help me in finding all the different versions of MSDE 2000 that came out since it's first release. I expected to find something similar like Sun's...
5
by: Igor Solodovnikov | last post by:
Hi. I am trying to automatically backup transaction log when error 9002 happened. So i have created appropriate job and alert to catch this error. I have two instances of sql server under Windows...
10
by: noname | last post by:
MSDE 2000 Release A installed under windows 2000 pro will not communicate with SQL Server Manager nor MS Access on peer computer. Can someone help? Have set DISABLENETWORKPROTOCOLS=0 at install...
3
by: *no spam* | last post by:
I want to move my Access 2K database into MSDE. The Access Upsizing Wizard crashes (a known bug wi A2K), so I'm using the following suggested method: Access --> New --> Project (Existing...
5
by: Robin Tucker | last post by:
I'm looking for a simple way of telling (inside a stored procedure) if I'm currently using MSDE or a full SQL server. Ideally, there is some pre-defined environment variable that won't cause me...
7
by: Diogo Alves - Software Developer | last post by:
hi there I am developing a software that needs a database to be shared, I've heard about MSDE, can someone tell me if * There is a newer version than MSDE 2000? * It's possible to use MSDE...
3
by: Paul Aspinall | last post by:
Hi I want to package my C# winforms app, to be deployed with MSDE, as easily as possible for the end user. I want to create an MSI or Installshield (prefer MSI), to setup my C# app, together...
4
by: Anthony P. Mancini | last post by:
Does anyone know how to make the MSDE do SQL authentication ? It appears to authenticate using Windows at all times. Thanks, Anthony
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.