"Marcin Wasilewski" <ma********************@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Now i'm using:
Set cnnOLEDB_SQLServer = New ADODB.Connection
gstrSQLServerName = "C-MWA"
cnnOLEDB_SQLServer.Open "Provider=sqloledb;" & _
"Data Source=" & gstrSQLServerName & ";" & _
"Initial Catalog=pubs;User Id = Test; " & _
"Password=aaa;"
but there is a error:
"Login failed for user 'Test'. Reason: Not associated with a trusted
SQL Server connection"
I'm using windows user to authorize. The user is Test and password aaa.
Am I change some permisions in data base or server?
If you want to use a Windows account, then you do not give the username and
password! That is the point. You have already logged on to Windows by
giving these details once - so Windows knows who you are - and so the server
can trust you. The connection string is set up like this:
strConnection = "Provider=sqloledb;" & _
"Data Source=C-MWA;" & _
"Initial Catalog=pubs;" & _
"Integrated Security=SSPI"