<i id='fNbTy'><tr id='fNbTy'><dt id='fNbTy'><q id='fNbTy'><span id='fNbTy'><b id='fNbTy'><form id='fNbTy'><ins id='fNbTy'></ins><ul id='fNbTy'></ul><sub id='fNbTy'></sub></form><legend id='fNbTy'></legend><bdo id='fNbTy'><pre id='fNbTy'><center id='fNbTy'></center></pre></bdo></b><th id='fNbTy'></th></span></q></dt></tr></i><div id='fNbTy'><tfoot id='fNbTy'></tfoot><dl id='fNbTy'><fieldset id='fNbTy'></fieldset></dl></div>
  • <tfoot id='fNbTy'></tfoot>

    • <bdo id='fNbTy'></bdo><ul id='fNbTy'></ul>

  • <small id='fNbTy'></small><noframes id='fNbTy'>

        <legend id='fNbTy'><style id='fNbTy'><dir id='fNbTy'><q id='fNbTy'></q></dir></style></legend>

      1. 如何以编程方式创建 DSN?

        How can I programmatically create a DSN?(如何以编程方式创建 DSN?)
      2. <legend id='d4HhO'><style id='d4HhO'><dir id='d4HhO'><q id='d4HhO'></q></dir></style></legend>

          • <bdo id='d4HhO'></bdo><ul id='d4HhO'></ul>
            • <small id='d4HhO'></small><noframes id='d4HhO'>

              <tfoot id='d4HhO'></tfoot>

                  <tbody id='d4HhO'></tbody>

                  <i id='d4HhO'><tr id='d4HhO'><dt id='d4HhO'><q id='d4HhO'><span id='d4HhO'><b id='d4HhO'><form id='d4HhO'><ins id='d4HhO'></ins><ul id='d4HhO'></ul><sub id='d4HhO'></sub></form><legend id='d4HhO'></legend><bdo id='d4HhO'><pre id='d4HhO'><center id='d4HhO'></center></pre></bdo></b><th id='d4HhO'></th></span></q></dt></tr></i><div id='d4HhO'><tfoot id='d4HhO'></tfoot><dl id='d4HhO'><fieldset id='d4HhO'></fieldset></dl></div>

                  本文介绍了如何以编程方式创建 DSN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个使用链接的 sql server 表作为数据源的访问表单.我需要尽快将这个文件分发给其他用户,我需要一种方法来以编程方式将 DSN 安装到他们的机器上.这是手动设置链接的过程:

                  I have an Access Form that uses a linked sql server table as a datasource. I will need to distribute this file to other users soon and I need a way to programmaticly install the DSN to their machines. This is the process of manually setting up the link:

                  外部数据 > 更多 > ODBC 数据库 > 数据源链接 > 机器数据源选项卡 >按新建 > 用户数据源 > sql server > name=up to you;server= serverName > SQL server 如何验证登录ID的真实性?使用网络登录ID进行Windows NT身份验证 >附加数据库文件名(数据库名称)>选择表并按确定

                  External Data > More > ODBC Database > Link to data source > Machine data source tab > press new > user data source > sql server > name=up to you; server= serverName > How should SQL server verify the autheticity of the login ID? With windows NT authentication using the network login ID > Attach database File Name (database name) > choose the table and press ok

                  这就是我访问我的表时所做的,但我希望用户可以按下按钮并访问该表,同时使用 Windows NT 身份验证进行身份验证.

                  That is what I did to access my table but I would like it so that the user can press a button and get access to the table and at the same time be authenticated by using windows NT authentication.

                  我很难找到一种在 access vba 代码中编写此代码的方法,有人可以指导我朝正确的方向发展吗?

                  I am having trouble finding a way to write this in access vba code can someone direct me in the right direction?

                  推荐答案

                  作为一般规则,您会发现使用无 DSN 的连接会取得更大的成功.这将消除许多问题和问题.此处概述了如何使用无 DSN 连接:

                  As a general rule you find MUCH better success by using a DSN less connection. This will eliminate many issues and problems. How to use a DSN less connection is outlined here:

                  http://www.accessmvp.com/DJSteele/DSNLessLinks.html

                  而且您也不想在连接字符串中存储用户名 + 密码,而只想登录"一次.这再次节省了大量麻烦,也意味着您的连接字符串和/或 DSN 不必在实际链接中保存和公开用户名和密码.

                  And also you do NOT want to store the user name + password in the connection string, but only "log on" one time. Again this saves huge hassles and also means your connection strings and/or DSN does not have to save and expose the user name and password in the actual links.

                  这种方法意味着您可以有不同的登录,而不必重新链接或更改现有的表链接.

                  And this approach means you can have different logons and NOT have to re-link or change existing table links.

                  以下显示了如何使用缓存登录,从而允许用户进行不同的登录,而无需重新链接您的表.

                  The follow shows how to use a cached logon and this thus allows one to have different logons without having to re-link your tables.

                  https://blogs.office.com/en-us/2011/04/08/power-tip-improve-the-security-of-database-connections/

                  我强烈建议您在使用链接表到 SQL Server 时采用上述两种方法.

                  I highly recommend you adopt both of the above approaches when using linked tables to SQL server.

                  这篇关于如何以编程方式创建 DSN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Building a comma separated list?(建立一个逗号分隔的列表?)
                  Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column(尽管每列都使用了 varchar(MAX),但在导入 CSV 文件时 SQL Server 中出现错误)
                  How can I import an Excel file into SQL Server?(如何将 Excel 文件导入 SQL Server?)
                  Export table to file with column headers (column names) using the bcp utility and SQL Server 2008(使用 bcp 实用程序和 SQL Server 2008 将表导出到带有列标题(列名称)的文件)
                  Concat field value to string in SQL Server(将字段值连接到 SQL Server 中的字符串)
                  SQL Server Bulk insert of CSV file with inconsistent quotes(SQL Server 批量插入带有不一致引号的 CSV 文件)

                    <legend id='Xsj2T'><style id='Xsj2T'><dir id='Xsj2T'><q id='Xsj2T'></q></dir></style></legend>
                      1. <small id='Xsj2T'></small><noframes id='Xsj2T'>

                          <tbody id='Xsj2T'></tbody>

                          <tfoot id='Xsj2T'></tfoot>

                          • <bdo id='Xsj2T'></bdo><ul id='Xsj2T'></ul>
                          • <i id='Xsj2T'><tr id='Xsj2T'><dt id='Xsj2T'><q id='Xsj2T'><span id='Xsj2T'><b id='Xsj2T'><form id='Xsj2T'><ins id='Xsj2T'></ins><ul id='Xsj2T'></ul><sub id='Xsj2T'></sub></form><legend id='Xsj2T'></legend><bdo id='Xsj2T'><pre id='Xsj2T'><center id='Xsj2T'></center></pre></bdo></b><th id='Xsj2T'></th></span></q></dt></tr></i><div id='Xsj2T'><tfoot id='Xsj2T'></tfoot><dl id='Xsj2T'><fieldset id='Xsj2T'></fieldset></dl></div>