J'ai l'erreur 3734 qui survient...
J'ai trouvé cette documentation :
Symtom: When multiple users open the same MS-Access MDE (or MDB) file (or when a single user opens multiple instances of the same MDE file), the following error can occur:
The database has been placed in a state by user <name> on machine <name> that prevents it from being opened or locked. (Error 3734)
This error occurs when the new passive shutdown/connection control is being used. This error message indicates that a user set the database in a mode that will prevent other users from opening it.
Software: Microsoft Access 2003.
Cause: This error can occur when the database is automatically temporarily "promoted" from share mode to exclusive mode. This may happen when the VBA program changes something that Access wants to store within the MDE file, e.g. toolbar/menubar items (through Application.CommandBars).
Solution: The automatic promotion from shared mode to exclusive mode seems to occur only while the database is opened once. When the database is open more than once, the promotion does not occur. To prevent the locking effect from happening, the program can open it's own program database a second time (and keep it open), just at the start of the program.
Example:
Note: I found that opening the program MDB/MDE (a second time) through ADO seems to be the best solution. Opening though DAO within the default workspace has unwanted side effects on the MS-Access application. Opening through DAO within a separate workspace has no effect, i.e. it does not solve the problem.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Public Function Autoexec() Static Conn2 As Object Set Conn2 = CreateObject("ADODB.Connection") Conn2.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & CurrentProject.FullName End Sub
Je ne trouve pas quand meme comment arranger ce probleme, j'ai essayé cette fonction mais cela n'a pas marché... p-e le provider n'est-il pas bon.. comment faire pour savoir quel provider j'ai besoin???
Partager