DSN较少连接(MS访问SQL2016)
当我想将链接表转换为DSNLess连接时,我有一个可行的解决方案:
I have this solution that works when I want to convert linked tables to a DSNLess Connection:
http://www.accessmvp.com/djsteele/DSNLessLinks.html
但是它一直是SQL2012的Access DB(2010或2013).我现在有一个SQL2016实例,试图与之建立DSNLess连接.所以这是我尝试过的:
But it's always been an Access DB (2010 or 2013) to SQL2012. I now have a SQL2016 instance that I'm trying to make a DSNLess Connection to. So here is what I've tried:
按照文章中的代码运行..这给了我一个SSL安全错误.
Running the code as given in the article.. This gives me an SSL Security Error.
更改要使用的连接:
strConnectionString = "Provider=SQLNCLI11;" & _
"Server=" & ServerName & ";" & _
"Database=" & DatabaseName & ";" & _
"Trusted_Connection=Yes;"
执行此操作时,它提示我找不到可安装的ISAM".我需要进行哪些更改才能使其与SQL2016一起使用?
When I do this, it gives me "Could not find installable ISAM". What do I need to change to get this to work with SQL2016?
好吧,在发布此内容后,我立即找到了解决方案.在本文中,我发现您只可以列出驱动程序:
Well, right after posting this I found my solution. In this article I found you can just list the driver:
So, what I did was make my connection be this:
strConnectionString = "ODBC;Driver={SQL Server Native Client 11.0};" & _
"Database=" & DatabaseName & ";" & _
"Server=" & ServerName & ";" & _
"Trusted_Connection=Yes;"
效果很好.