Here is some problems,
I try to connect to SQL server using this procedure, everything is OK if i
use standart securuty,
but in NT mode - SQL server return error (example. Login failed for user
'Viktors.').
User - Viktors - present on SQL server, and security mode NT Security.
Access to base granted too.
Victor
Yesilevsky
Platform Client: Win2000 SP1, ADO 2.5
Platform Server: WinNT SP6, SQL Server 7.0 SP 2, ADO 2.5
Domain Controller: WinNT (may be here is problem)
Public Function Login(rNTMode As Boolean, rServer As String, rDatabase As
String, Optional rUserName As String, Optional rPassword As String) As
ADODB.Connection
Dim tdbc As ADODB.Connection
Set tdbc = New ADODB.Connection
tdbc.Provider = "SQLOLEDB"
tdbc.ConnectionString = "server=" & rServer & ";database=" & rDatabase
tdbc.Properties("Application Name") = App.ProductName & " Server"
If rNTMode = True Then
tdbc.Open
Else
tdbc.Open , rUserName, rPassword
End If
If Err.Number = 0 Then
Set Login = tdbc
Else
Set tdbc = Nothing
End If
End Function
Debug by going to a command prompt and typing "net use \\MyServer\IPC$
/user:MyDomain\MyUsername [password]"--if that doesn't work then your SQL
trusted connection certainly won't!
Also make sure your SQL trusted connection has the domain properly set as
well.
If all that works but your SQL connection still doesn't work, check who you
are getting in as by allowing everyone access to a dummy database and
executing an SP_WHO.
Good luck,
Glen Starrett
"Victor Yesilevsky" <vik...@ipc.org.lv> wrote in message
news:e4MIeyHsAHA.2112@tkmsftngp05...
SQL server member of my Domain.
SQL login I think, set properly because (for example - Query Analyzer) using
this mode -
connect process normally.
And user name by SP_WHO - DomainName\UserName
In commnad prompt " net use ... ", result "The command complited
succesfully"
But if I give access to one of bases for everyone (public, and viktors
user)
I can't access to base too. Only one way to give password and concrete
user name
Victor
Yesilevsky
"Glen Starrett" <g-l-e-n.s-t...@honeywell.com> wrote in message
news:MCrt6.282$CU6.1...@dfiatx1-snr1.gtei.net...