|
Posted by Erland Sommarskog on 10/02/38 11:50
MVChauhan@googlemail.com (MVChauhan@googlemail.com) writes:
> Thanks for your reply.
> I still cant conntect to SQL Server.
>
> I downloaded SQL Native Client and installed on the web server.
>
> I looked in SAC Tool and "Local and Remote Connection" and "Using Both
> TCP/IP and Named Pipes" options are selected. I have checked SQL
> Browser service is running.
>
> Now when i use this string
>
>
"Provider=SQLNCLI;Server=127.0.0.1;Database=DBName;UID=UserName;PWD=UserPass
word;"
>
> i get
>
> Microsoft SQL Native Client error '80040e4d'
> Login failed for user 'UserName'.
This is strange, because as I understood your original post, you were
connecting from a web server that was a on different machine from where
SQL Server is running.
However, in your connection string you have specified 127.0.0.1 which is
always the local machine. Still, you do make contact with an SQL Server
instance since you get that message.
Since I don't see your configuration, I'm left to guessworks, but there
are two obvious possibilities:
1) You have the username/password wrong.
2) You have an of SQL Server on the web server as well, but that's
not the one you intend to connect to.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|