简体   繁体   English

ADO VBA 连接到 Azure SQL 数据库,无需安装驱动程序

[英]ADO VBA Connecting to an Azure SQL database without installing a driver

I am using this connection string to connect to an Azure SQL database from inside Excel and everything works fine because I have installed Microsoft's OLE DB driver.我正在使用此连接字符串从 Excel 内部连接到 Azure SQL 数据库,一切正常,因为我已经安装了 Microsoft 的OLE DB驱动程序。

I was wondering if it is possible to connect without installing this driver?我想知道是否可以在不安装此驱动程序的情况下进行连接? I have many users that should do it and it is not practical to ask IT for many installations.我有很多用户应该这样做,并且要求 IT 进行多次安装是不切实际的。 The users themselves are not a local admin on their Windows 10 so I am looking for a workaround用户本身不是 Windows 10 的本地管理员,所以我正在寻找解决方法

'connection string (azure)
Public Const sConnectionStringAzure = "Provider=MSOLEDBSQL;" & _
                        "DataTypeCompatibility=80;" & _
                        "Server=tcp:myserver.database.example.net,1433;" & _
                        "Database=mydatabase;" & _
                        "Uid=BasicUser@myserver;" & _
                        "Pwd={abc};" & _
                        "Encrypt=yes;Connection Timeout=30;"

As I know, no matter which way connect to Azure SQL database, we all need the driver support.据我所知,无论哪种方式连接到 Azure SQL 数据库,我们都需要驱动支持。 We still need install it on local machines.我们仍然需要在本地机器上安装它。

Most tools which integrate the driver in it so that we can use it directly without install the SQL driver again.大多数工具都集成了驱动程序,因此我们可以直接使用它,而无需再次安装 SQL 驱动程序。

There isn't a pre-installed driver on Windows 10 which we can use it connect to Azure SQL database. Windows 10 上没有预安装的驱动程序,我们可以使用它连接到 Azure SQL 数据库。

HTH. HTH。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM