Dinesh.
"Le" <leon@weepirate.com> wrote in message
news:06e701c3525c$7706f780$a301280a@phx.gbl...
> Dinesh, I am having the same problem...
>
> So what is the solution? A newbie as well here...
>
> >-----Original Message-----
> >Brent,
> >
> >You were passing "uid=sa;pwd=zzz;" and 'sa' is a SQL
> Server login.Since your
> >authentication was set as 'Windows Only', connection was
> not possible.
> >
> >--
> >Dinesh.
> >SQL Server FAQ at
> >
http://www.tkdinesh.com > >
> >"Brent" <brentlamoureux@hotmail.com> wrote in message
> >news:141301c3522b$24d9a2e0$a001280a@phx.gbl...
> >> Wouldn't you know it, after 8 hours of banging my head
> >> against the wall, all I had to do was enable mixed-mode
> >> authentication in SQL Server. I guess connecting through
> >> a C# compiled file is not the same as by normal Windows
> >> Authentication.
> >>
> >> Hope this helps anyone else having this problem.
> >>
> >> >-----Original Message-----
> >> >Hi,
> >> >
> >> >I'm running SQL Server 2000 that came with Office XP
> >> >developer. I am trying to connect to a default instance
> >> >of SQL Server through a C# file using the SQLConnection
> >> >object.
> >> >
> >> >ie,
> >> >SqlConnection cn;
> >> >
> >> >cn = new SqlConnection
> >> >("server=xxx;uid=sa;pwd=zzz;database=Northwind;" );
> >> >
> >> >My OS Is Windows XP Pro, and I have IIS running to
> serve
> >> >up the ASPX page I am compiling.
> >> >
> >> >The error I get is:
> >> >
> >> >Connection failed: Login failed for user 'sa'. Reason:
> >> >Not associated with a trusted SQL Server connection.
> >> >
> >> >Has anyone ever seen this problem? Is there a procedure
> >> I
> >> >can follow to properly connect? (Do I need to set up
> >> some
> >> >account information in Windows AND SQL server?) My SQL
> >> >Query Analyzer has no problem connecting to my database
> >> >using my current Windows Admin account, but when I try
> >> to
> >> >use this Admin account, it too gives the same error.
> >> I've
> >> >searched the net for an explanation for this, but
> >> nothing
> >> >I've tried has worked.
> >> >
> >> >Any help is greatly appreciated,
> >> >
> >> >Brent
> >> >.
> >> >
> >
> >
> >.
> >