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

前端 未结 4 791
离开以前
离开以前 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 12:03

    Working sample for VBA Excel 2010

    Provider=SQLOLEDB;Data Source=ServerIPOrName;Initial Catalog=DatabaseName;Trusted_connection=yes;

提交回复
热议问题