DSN较少连接(MS访问SQL2016) [英] DSN Less Connection (MS Access to SQL2016)

查看:73
本文介绍了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;"

效果很好.

这篇关于DSN较少连接(MS访问SQL2016)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆