Hello,

I am trying to connect to SQL Server using integrated security in Access code. I have changed the existing connection, which used the SQL Std login and changed the connection string.


Public Function CheckServer(ByVal sServer As String, ByVal sDatabase As String, ByVal sUser As String) As Boolean

On Error GoTo CheckServerExit

Dim cnADO As ADODB.Connection

CheckServer = False

Set cnADO = New ADODB.Connection

'''old connection
'''cnADO.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & sUser & ";Initial Catalog=" & sDatabase & ";Data Source=" & sServer

'''new connection
cnADO.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=sDatabase;Data Source=sServer"

CheckServer = True

CheckServerExit:
Set cnADO = Nothing
End Function

This currently works in VB, but is not connectiong thru in Access...

It would be of great help if anyone can get back to me on this....

Thanx in advance

cheers
Kiran