Redian新闻
>
DSN-less connection to SQL server
avatar
DSN-less connection to SQL server# Database - 数据库
b*u
1
still old question:
I have a SQL server db and some Access front-end reports. I will have multiple
users that need to use the Access reports. I don't want to set system DSN for
everyone of them. because that would make it hard for me to modify my tables
since every time I would need to refresh the linked table for every computer.
So, I am trying to write a DSNless connection:
strCnct = "ODBC; DRIVER=SQL
server;SERVER=myServer;DATABASE=myDB;UID=myUser;PWD=myPWD"

DoCmd.TransferDatabase acLink,
avatar
k*d
2
As what I know, ODBC is the only way for connection between SQL Server and
Access. Even you set up a connection string, Access still askes you for the
ODBC information including UID and PWD.
My suggestion is: set up a system DSN without login information, for all
users. When user uses access, it will ask user to input the login information.

multiple
for
computer.
still

【在 b******u 的大作中提到】
: still old question:
: I have a SQL server db and some Access front-end reports. I will have multiple
: users that need to use the Access reports. I don't want to set system DSN for
: everyone of them. because that would make it hard for me to modify my tables
: since every time I would need to refresh the linked table for every computer.
: So, I am trying to write a DSNless connection:
: strCnct = "ODBC; DRIVER=SQL
: server;SERVER=myServer;DATABASE=myDB;UID=myUser;PWD=myPWD"
:
: DoCmd.TransferDatabase acLink,

avatar
b*u
3
Thanks a lot for your help.
I can do something like
strCnct = "ODBC; DRIVER={SQL
server};SERVER=ABC-SQL-01;DATABASE=ABC2;trusted_connection=yes"
As I understand it, the "trusted_connection=yes" is supposed to antomatically
use the UserName and Password that the person used to log into thier windows
boxes. This way I don't need a login screen...
sigh. but I still get same error...

information.
tables
"ODBC:

【在 k*******d 的大作中提到】
: As what I know, ODBC is the only way for connection between SQL Server and
: Access. Even you set up a connection string, Access still askes you for the
: ODBC information including UID and PWD.
: My suggestion is: set up a system DSN without login information, for all
: users. When user uses access, it will ask user to input the login information.
:
: multiple
: for
: computer.
: still

avatar
b*u
4

This one I understand..What I am trying to get, is a DSN-less ODBC connection.
I assume it's not too hard to do. For example ADO/RDO are all doing this,
right?
information.
tables
"ODBC:

【在 k*******d 的大作中提到】
: As what I know, ODBC is the only way for connection between SQL Server and
: Access. Even you set up a connection string, Access still askes you for the
: ODBC information including UID and PWD.
: My suggestion is: set up a system DSN without login information, for all
: users. When user uses access, it will ask user to input the login information.
:
: multiple
: for
: computer.
: still

avatar
D*N
5
Try distributing it with a file dsn.
[ODBC]
DRIVER=SQL Server
UID=myUser
PWD=myPWD
Trusted_Connection=NO
DATABASE=myDB
APP=MicrosoftAccess
SERVER=myServer
It'd still be an ODBC datasource but doesn't need setting up..

【在 b******u 的大作中提到】
: still old question:
: I have a SQL server db and some Access front-end reports. I will have multiple
: users that need to use the Access reports. I don't want to set system DSN for
: everyone of them. because that would make it hard for me to modify my tables
: since every time I would need to refresh the linked table for every computer.
: So, I am trying to write a DSNless connection:
: strCnct = "ODBC; DRIVER=SQL
: server;SERVER=myServer;DATABASE=myDB;UID=myUser;PWD=myPWD"
:
: DoCmd.TransferDatabase acLink,

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。