Excel VBA - connect to sql with a trusted connection (no uid/pwd)
adodb, connection-string, excel, sql, vba
Solution
I have this connectionstring in an Excel 2003 VBA project...
"Provider=SQLOLEDB;Data Source=[You DB Name];Trusted_connection=yes;"
And it works for me! (I'm using ADODB)
Problem
Is there a way to have Excel connect to Sql Server using the current user's network windows authentication (trusted connection/integrated security)? I don't want to rely on a sql login or have a uid/password in my code.