问题描述
问题陈述:想要使用 Excel 宏连接 Azure Synapse 数据库并将记录插入到表中。 使用硬编码的用户名和密码时,连接字符串可以正常工作。
con.Provider = "sqlNCLI11"
con.ConnectionString = "Server=...net,1433;Initial Catalog=;Persist Security Info=False;UserID=**;Password=*******;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=100 ;"
con.Open
但是,要求连接不使用用户名和密码,并使用 Active Directory Service Principal 身份验证或 Active Directory Integrated 等。
但是,下面的代码不起作用
con.ConnectionString = "Server=.database.**.net,Authentication=Active Directory Service Principal; Database=****; UserId=; Password =;"
有什么建议可以在没有用户名和密码的情况下实现这一目标吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)