Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NT Security connection problem

0 views
Skip to first unread message

Victor Yesilevsky

unread,
Mar 19, 2001, 8:55:07 AM3/19/01
to
Hello,

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


Glen Starrett

unread,
Mar 19, 2001, 12:47:24 PM3/19/01
to
If your SQL server is a member server, workstation, or a domain controller
for another domain, make sure you are including the domain with the
username, like "MyDomain\MyUsername". When the SQL server is a domain
controller for the domain you are logged into you can leave the domain name
off (but it is good practice to use it anyway).

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...

Victor Yesilevsky

unread,
Mar 20, 2001, 6:12:04 AM3/20/01
to
Thanks for attention Glen,

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...

0 new messages