MS Access cannot communicate with encrypted database

I have a quandry. I have developed an Access application and am ready to distribute it. I just shared a database. (I know, some say that I had to develop it from the very beginning ... I did not) I also just encrypted the backend database. In the interface, I contacted the backend and entered the correct password when prompted. Linked tables now appear in my fronend database. However, when I try to access one of the related tables, I get a pop-up message that just says “Invalid password”.

I tried deleting related tables and restarting. I tried updating the link. Nothing is working. Each search performed assumes that the links were created BEFORE encryption and that no password was entered. Not so here.

Can anybody help?

Windows 7 - Access 2010

Multiguy

+4
source share
3 answers

From the comments

OOOOOPPPPPSSSS !!!! Ok, I found a problem. Access does not like the use of other characters. In my password I had a set of parentheses. Deleted, and all is well !:-)

- MultiGuy

+3
source

I would add to this; The password for connecting to the back table can be updated in the VBA macro. Add the following lines and replace the name for the linked table and password.

Dim cdb As DAO.Database Set cdb = CurrentDb cdb.TableDefs("Projects").Connect = "MS Access;PWD=PaSsWoRd;DATABASE=C:\Users\bob.smith\Desktop\Split\Database_NEW_be.accdb" cdb.TableDefs("Projects").RefreshLink 

I found this to be useful after splitting the database at the front and back ends using the built-in split function. I needed to encrypt the back for security purposes and not want to recreate all data connections - isn't that the point of using the split function?

Duplicate the specified rows for each related table and skip the macro. Linked tables should resume after that.


This answer solved the problem for me. Therefore, I support and also want to provide an advanced version that you can run in all tables:

 Public Sub RevisePasswordForLink() Dim cdb As DAO.Database Set cdb = CurrentDb Dim tdf As TableDef, colTdf As TableDefs, strConnect As String Set colTdf = cdb.TableDefs strConnect = "MS Access;PWD=paSsWoRd;" _ "DATABASE=C:\Users\bob.smith\Desktop\Split\Database_NEW_be.accdb" For Each tdf In cdb.TableDefs ''I believe best to skip the hidden tables ("MSys*") If Not tdf.Name Like "MSys*" Then ''If your DB has any local tables, you can save yourself some errors ''by filtering them out (similar to hidden tables). cdb.TableDefs(tdf.Name).Connect = strConnect cdb.TableDefs(tdf.Name).RefreshLink Debug.Print " " & tdf.Name End If Next tdf Set cdb = Nothing Debug.Print "FINISHED " End Sub 
+1
source

I came across this thread when I had a similar problem with Access 2013. I encrypted the backend successfully. Each time I opened the backend, I could successfully open the backend using the password that I used to encrypt the backend.

So, I opened the interface, deleted the previously linked tables and contacted the recently encrypted backend again. As expected, during the link process he asked me for the password for the backend. I entered the correct password (I know this is correct because I inserted it, not typed it), and everything seemed to work correctly. All tables are displayed in the list of objects in the interface. However, if I try to open the linked table, I would get a window with the message "Invalid password".

After visiting some other threads, I tried to use a password on the backend, which had no special characters and had no spaces. Then drag them to the interface. Presto! This solved the problem.

So, try the following if you get an “Invalid password” in the interface, even if you can open the backend just fine, if you manually download it yourself: Remove any spaces or punctuation from the backend password and then delete and re-bind the related tables in the external interface.

0
source

Source: https://habr.com/ru/post/1400268/


All Articles