Login failed for user
From: Andy Sjostrom (andynospam_at_businessanyplace.net)
Date: 05/23/03
- Next message: Ian Posner: "Re: PREVENTING ACCESS"
- Previous message: Jobi: "Re: can no longer add new logins"
- Next in thread: Andy Sjostrom: "Re: Login failed for user"
- Reply: Andy Sjostrom: "Re: Login failed for user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 23 May 2003 11:55:25 +0200
I have a problem with accessing my database. I get the error message: "Login
failed for user 'SQLServerCEUser'."
My environment is:
Windows 2003
SQL Server 2000 SP3
I have set up the SQL Server to mixed mode (SQL Server and Windows)
authentication.
I have created a user called "SQLServerCEUser" on my server.
I have created a login for that user and given it access to my database
(dbo).
I have even tried to add the user to the NT group Administrators and all SQL
Server admin groups.
If I use the sa account and password it all works fine.
I try to run the following code from a regular Windows Forms app:
Dim connectionstring = "Data Source=myserver;Initial
Catalog=Northwind;uid=SQLServerCEUser;password=password;"
Dim cn As New SqlConnection(connectionstring)
Dim da As New SqlDataAdapter("SELECT * FROM Employees", cn)
Dim ds As New DataSet
Try
cn.Open()
da.Fill(ds)
Catch ex As SqlException
Finally
End Try
It works using the connectionstring:
Dim connectionstring = "Data Source=myserver;Initial
Catalog=Northwind;uid=sa;password=thisisnotmysapassword;"
When I look at the user's permissions from Enterprise Manager, it seems as
if the user has no permissions at all.
What am I doing wrong here? Any help much appreciated!
Andy Sjostrom
MS MVP - Mobile Devices
- Next message: Ian Posner: "Re: PREVENTING ACCESS"
- Previous message: Jobi: "Re: can no longer add new logins"
- Next in thread: Andy Sjostrom: "Re: Login failed for user"
- Reply: Andy Sjostrom: "Re: Login failed for user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|