Excel VBA - connect to sql with a trusted connection (no uid/pwd)

前端 未结 4 709
离开以前
离开以前 2021-02-14 11:37

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

4条回答
  •  终归单人心
    2021-02-14 11:57

    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)

提交回复
热议问题