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

前端 未结 4 716
离开以前
离开以前 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条回答
  •  旧时难觅i
    2021-02-14 11:57

    See: http://www.connectionstrings.com/

    Especially http://www.connectionstrings.com/sql-server-2005, for example:

    Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
    

    or any other suitable connection string you find there.

提交回复
热议问题