I have created a small Database using Visual Studio Community 2015 & SQL Server 2014 Management Studio, it seems fine, I can import to it, edit it, run queries on it, it just seems perfectly OK.
However, I can't connect to it from my Outlook VBA project, I get an error as follows ...
ScreenHunter_06 Feb. 18 18.18.png
... This is from the Visual Studio Server Explorer ..
ScreenHunter_06 Feb. 18 18.26.jpg
... These are the details of the Connection ...
ScreenHunter_06 Feb. 18 17.53.jpg
... and these are the Advanced Properties ...
ScreenHunter_06 Feb. 18 17.55.jpg
... The full Connection String is as follows ...
Data Source=GARY-PC\SQLEXPRESS;Initial Catalog=KA_DataBase;Integrated Security=True
... But I have tried all of the following Connections (and others) in my VBA program ...
Set KA_DB = New ADODB.Connection
Set KA_RS_Attachments = New ADODB.Recordset
Set KA_RS_Teams = New ADODB.Recordset
Set KA_Com = New ADODB.Command
'KA_DB.ConnectionString = "driver={SQL Server};" & "Data Source=GARY-PC\SQLEXPRESS;Initial Catalog=KA_DataBase;Integrated Security=True"
'KA_DB.ConnectionString = "driver={SQL Server native Client 11.0};Data Source=GARY-PC\SQLEXPRESS;Initial Catalog=KA_DataBase;Integrated Security=True"
KA_DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=GARY-PC\SQLEXPRESS;Initial Catalog=KA_DataBase;Integrated Security=True"
KA_DB.ConnectionTimeout = 30
KA_DB.Open
... But always get the following error ...
ScreenHunter_06 Feb. 18 18.18.png
Can somebody please help ? I don't understand the seemingly unnecessary complication & the (standard Microsoft) unhelpful Error Message !!!
Thanks ...