Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Excel VBA Issues Connecting to Local SQL Database

$
0
0

I have been trying to connect to a local SQL server that I have created via excel VBA but am having issues. I am able to connect to the database using the "Get Data" functionality within excel and entering in the server as "(Local DB)\MSSQLLocalDB". However when I try connecting using VBA it does not work. Using windows authentication. Any ideas? Here is the string I used:

strConnString = "Provider=SQLOLEDB;Data Source=(LocalDB)\MSSQLLocalDB;Integrated Security=SSPI"

The error I get is "Run-time error '2147467259 (80004005)':

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.


Viewing all articles
Browse latest Browse all 88835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>