I am using access VBA and DAO to programmatically create linked tables.
I build a string like this:
strConnect = "ODBC;DRIVER=SQL Server;Database=mydatabase;Server=myserver;
I then create the TableDef:
Set td = CurrentDb.CreateTableDef(stlocalTableName, dbAttachSavePWD, stRemoteTableName, strConnect)
I then append the TableDef:
CurrentDb.TableDefs.Append td
I want the tables created / linked under an AD Group instead of my user.
I have tried numerous options and all I ever see when I create the table is:
...;UID=myuser;Trusted_Connection=Yes;..
Is it possible to link a table using an AD Group instead of an Individual user?
P.S. The AD group has datareader and datawriter rights to the database.
1条答案
按热度按时间x4shl7ld1#
It is the other way around. With a trusted connection, SQL reads the current logged on user and then looks up which rights might be granted to this user or the groups this user is a member of, and from this determines the final rights granted to the user. So try leaving out any SQL Server credentials, simply: