ACC: Connection String Is Accessible in Secured DatabasesID: Q135378
|
In a secured Microsoft Access 2.0, 7.0, and 97 database, a user with Open/Run permissions for the database can create a new module and obtain the connection string of any linked (attached) table in the database even though the user has no Read Design permissions for the linked table.
Microsoft has confirmed this to be a problem in Microsoft Access versions 2.0, 7.0, and 97.
The Connect property for a linked table is available through Visual Basic for Applications (or Access Basic in Microsoft Access 2.0) even when the user has no implicit or explicit Read Design permissions for the linked table. If the user can open a secured database and gain access to the Database window, the user can create a new module. Once in a module, the user can create the code below to obtain the connection string for a specific linked table.
Option Explicit
Function GetConnect (mytable As String)
Dim mydb As Database
Set mydb = CurrentDB()
GetConnect = mydb.tabledefs(mytable).Connect
End Function
? GetConnect("<attached table name>")
For more information about Connect property, search the Help Index for "Connect property," or ask the Microsoft Access 97 Office Assistant.
Keywords : kbdta
Version : 2.0 7.0 97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 29, 1999