简体   繁体   English

从MS-Access连接到sql server而不创建DSN

[英]Connect to sql server from MS-Access without creating DSN

I am using Access as a front end database to connect to SQL Server data. 我使用Access作为前端数据库连接到SQL Server数据。 On my computer, it works just fine. 在我的电脑上,它工作得很好。 On a user computer, it doesn't work. 在用户计算机上,它不起作用。 Has anyone successfully done this without creating a DSN on each computer? 有没有人成功完成此操作而不在每台计算机上创建DSN? Thanks, Jeff 谢谢,杰夫

You will need to make sure what ever user is trying to connect to the DB has rights in SQL Server to view it. 您需要确保用户尝试连接到数据库的权限在SQL Server中有权查看它。 Access won't just remove the security needed to view it. Access不仅会删除查看它所需的安全性。 You could create a DB role then put everyone needing to get into that DB into the role and grant that role access. 您可以创建一个数据库角色,然后将需要进入该角色的每个人放入该角色并授予该角色访问权限。 You could also get an AD group created for anyone that needs to view the table and get people added to that group then grant that group access. 您还可以为需要查看该表的任何人创建一个AD组,并将人员添加到该组,然后授予该组访问权限。

You can connect using an ODBC connection with saved credentials to trick the sql server into thinking the user is someone else. 您可以使用保存凭据的ODBC连接进行连接,以欺骗sql server认为用户是其他人。 However, i would only do this and provide read only access. 但是,我只会这样做并提供只读访问权限。 Then, you can revoke access to that username whenever and the whole system stops. 然后,您可以在整个系统停止时撤消对该用户名的访问权限。 Easy to do., just build an ODBC connection and save the username and password in it. 很容易做到,只需构建一个ODBC连接并在其中保存用户名和密码。

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

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