Home > Archive > MS SQL Server Connectivity > August 2005 > login failed for user ... Not Associated with a trusted SQL Server









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author login failed for user ... Not Associated with a trusted SQL Server
Christian F CLY

2005-08-02, 9:23 am

Hello,

I'm trying to connect a mobile computer runing under windows CE to a
database located on a windows XP desktop.
The mobile computer application is written in C# under Visual Studio .NET
2003.

My problem occurs when I execute mConnection.Open();

A SqlException is caught with this message :
Login failed for user '(null)'. Reason : Not associated with a trusted SQL
Server connection.

here is the connection string :
mConnection = new SqlConnection("User ID=sa;data source=" + mSqlServer +
";Integrated Security=SSPI;initia
l catalog=IDPS;Passwor
d=xxxx;persist
security info=false;Trusted_C
onnection=yes");

What can I do to correct it ?
Sue Hoegemeier

2005-08-02, 8:23 pm

In your connection string, you are specifying parameters for
both SQL authentication and Windows authentication - it
needs to be one or the other. If you use Windows
authentication, you don't specify a user id and password.
You can find some examples at:
http://www.carlprothman.net/Default...> nagedProvider

-Sue

On Tue, 2 Aug 2005 07:56:11 -0700, Christian F CLY
< ChristianFCLY@discus
sions.microsoft.com> wrote:

>Hello,
>
>I'm trying to connect a mobile computer runing under windows CE to a
>database located on a windows XP desktop.
>The mobile computer application is written in C# under Visual Studio .NET
>2003.
>
>My problem occurs when I execute mConnection.Open();
>
>A SqlException is caught with this message :
>Login failed for user '(null)'. Reason : Not associated with a trusted SQL
>Server connection.
>
>here is the connection string :
>mConnection = new SqlConnection("User ID=sa;data source=" + mSqlServer +
>";Integrated Security=SSPI;initia
l catalog=IDPS;Passwor
d=xxxx;persist
>security info=false;Trusted_C
onnection=yes");
>
>What can I do to correct it ?


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com