Discussion:
Creating linked SQL table in Access
(too old to reply)
Declan
2008-03-14 15:57:00 UTC
Permalink
I'm running SQL Server Express 2005 on our server and it's server
authentication is set to "SQL Server and Windows Authentication mode". I
wrote the following DAO procedure in Access 2003.

Function LinkTables()

Dim DB As Database
Dim tDef As TableDef

Set DB = CurrentDb
Set tDef = DB.CreateTableDef("Users")
tDef.Connect = "ODBC;Driver={SQL
Server};Server=AltekNT\SQLEXPRESS;Database=ALTEK;UID=ez1;PWD=test-1"
tDef.SourceTableName = "dbo.Users"
DB.TableDefs.Append tDef

End Function

ez1 only has read permissions, yet I'm able to update data in the linked
table, and the connect string for the table becomes "ODBC;DRIVER=SQL
Server;SERVER=BackupServer;APP=Microsoft Office
2003;WSID=BACKUPSERVER;DATABASE=bomdSQL;Trusted_Connection=Yes" In fact, I
don't have to even supply a valid logon id and password for me to be able to
link to the table with full permissions. How can I prevent someone from
being able to link to a SQL Server table with full permissions unless a valid
username and passwork is supplied? How can I make it so the connect string
doesn't automatically get set to "Trust_Connection"?
Alex Dybenko
2008-03-15 07:54:39 UTC
Permalink
You can remove window logins/groups for this user from SQL server security -
then sql security will be used
OR
you can use windows security and setup read-only access for that user
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
Post by Declan
I'm running SQL Server Express 2005 on our server and it's server
authentication is set to "SQL Server and Windows Authentication mode". I
wrote the following DAO procedure in Access 2003.
Function LinkTables()
Dim DB As Database
Dim tDef As TableDef
Set DB = CurrentDb
Set tDef = DB.CreateTableDef("Users")
tDef.Connect = "ODBC;Driver={SQL
Server};Server=AltekNT\SQLEXPRESS;Database=ALTEK;UID=ez1;PWD=test-1"
tDef.SourceTableName = "dbo.Users"
DB.TableDefs.Append tDef
End Function
ez1 only has read permissions, yet I'm able to update data in the linked
table, and the connect string for the table becomes "ODBC;DRIVER=SQL
Server;SERVER=BackupServer;APP=Microsoft Office
2003;WSID=BACKUPSERVER;DATABASE=bomdSQL;Trusted_Connection=Yes" In fact, I
don't have to even supply a valid logon id and password for me to be able to
link to the table with full permissions. How can I prevent someone from
being able to link to a SQL Server table with full permissions unless a valid
username and passwork is supplied? How can I make it so the connect string
doesn't automatically get set to "Trust_Connection"?
Loading...