如何使用VBA将SQL Server 2012数据库连接到Excel
我从网络托管服务提供商处购买了虚拟专用服务器(VPS)。它有一个专用的SQL Server安装在其中。我正在尝试使用ADODB连接从Excel连接到数据库。它给出以下错误。
[DBNETLIB] ConnectionOpen(Connect()] SQL Server不存在或访问被拒绝。
我已经尝试了各种网站建议的几种解决方案,但没有任何效果。根据我从提供商处收到的信息,这应该是可能的。
连接字符串使用:
Provider = SQLOLEDB; Server = xxxxxxx \SQLEXRESS; Database = xxx; Trusted_Connection = True; Integrated Security = SSPI;
请帮忙吗?
谢谢
Raj
Hi,
I have purchased a Virtual Private Server (VPS) from a web hosting providers. It has a dedicated SQL Server Installed in it. I am trying to connect to the database from Excel using ADODB connection. It gives the following error.
[DBNETLIB]ConnectionOpen(Connect()]SQL Server does not exist or access denied.
I have tried several solutions suggested by various sites, but nothing works out. As per the information I received from the providers, this should be possible.
Connection String used:
"Provider=SQLOLEDB; Server=xxxxxxx\SQLEXRESS; Database=xxx; Trusted_Connection=True;Integrated Security=SSPI; "
Can any one help please?
Thanks
Raj
我建议更改连接字符串: http://www.connectionstrings.com/sql-server / [ ^ ]使用IP和用户名局域网外的每个服务器通常都使用自定义授权;)
不是e有足够的信息来发布更详细的答案。
I'd suggest to change connection string: http://www.connectionstrings.com/sql-server/[^] to which uses IP and username and password. Each server outside the LAN usually uses custom authorization ;)
Not enough information to post more detailed answer.