| Author |
SQL Server Login faoled for user
|
|
|
| I just installed SQL Server 2000 on my Win 2000 machine. Both Client & Server.
When I run my program that executes ADO, I receive message
"Login failed for user 'Mylogin Name' ".
I am using Windows Authentication.
I do not have a password for my windows log in.
So I am not passing a password.
When I look at the security login under Enterprize management, the login
name is
SystemName/MyUserName
When I connect with ADO, my conn.properties("User ID") should be just my
user name?
Does anyone know what the problemm is?
| |
|
| When you use Windows Authentication you should not pass User Name or
Passwords. The Trusted_Connection=y
es will take the current login info from
the machine.
Dim cn As New ADODB.Connection
' Connection to SQL Server without using ODBC data source.
cn.Open "Driver={SQL
Server};Server=Serve
r1;Database=northwin
d;Trusted_Connection
=yes"
cn.Close
--
Thanks
Ravi
"Ron" wrote:
> I just installed SQL Server 2000 on my Win 2000 machine. Both Client & Server.
> When I run my program that executes ADO, I receive message
> "Login failed for user 'Mylogin Name' ".
> I am using Windows Authentication.
> I do not have a password for my windows log in.
> So I am not passing a password.
> When I look at the security login under Enterprize management, the login
> name is
> SystemName/MyUserName
> When I connect with ADO, my conn.properties("User ID") should be just my
> user name?
> Does anyone know what the problemm is?
>
>
>
>
>
| |
|
| Ravi
My ADO program requires
Conn.Properties("Data Source").Value
Conn.Properties("Initial Catalog").Value
Conn.Properties("User ID").Value
Conn.Properties("Password").Value
Are you saying User ID & Password need to both be blank?
This program used to work on my XP box until I downloaded SP2.
"Ravi" wrote:
[color=darkred]
> When you use Windows Authentication you should not pass User Name or
> Passwords. The Trusted_Connection=y
es will take the current login info from
> the machine.
>
> Dim cn As New ADODB.Connection
>
> ' Connection to SQL Server without using ODBC data source.
> cn.Open "Driver={SQL
> Server};Server=Serve
r1;Database=northwin
d;Trusted_Connection
=yes"
>
> cn.Close
> --
> Thanks
> Ravi
>
>
> "Ron" wrote:
>
| |
|
| Did you use Windows Authentication and passes Userr name and Password
Please refer this
http://msdn.microsoft.com/library/d...oprg01_0ahx.asp
--
Thanks
Ravi
"Ron" wrote:
[color=darkred]
> Ravi
> My ADO program requires
> Conn.Properties("Data Source").Value
> Conn.Properties("Initial Catalog").Value
> Conn.Properties("User ID").Value
> Conn.Properties("Password").Value
>
> Are you saying User ID & Password need to both be blank?
> This program used to work on my XP box until I downloaded SP2.
>
>
> "Ravi" wrote:
>
| |
|
| Yes We always uss Windows authentication. I also have this program running
on another SQL server at another location.
They are using WIN/2000 and there's works.
The only difference is they have a logon & password to sign into Windows.
"Ravi" wrote:
[color=darkred]
> Did you use Windows Authentication and passes Userr name and Password
>
> Please refer this
>
> http://msdn.microsoft.com/library/d...oprg01_0ahx.asp
> --
> Thanks
> Ravi
>
>
> "Ron" wrote:
>
|
|
|
|