Hi team,
i have the below code for initiating connection to the sql server 2014 which is currently using server authentication (userid and password). please help me how do i change the below code to login with the window authentication.
i have the below code for initiating connection to the sql server 2014 which is currently using server authentication (userid and password). please help me how do i change the below code to login with the window authentication.
Code:
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=" & file & ";" & _
"Extended Properties=Excel 8.0"
'Import by using Jet Provider.
strSQL = "Insert INTO [odbc;Driver={SQL Server};" & _
"Server=xxxxx;Database=xxxx;" & _
"UID=xxxx;PWD=xx].ALMIDs " & _
"Select [column1], [column2] FROM [sheet1$]"
Last edited: