18. august 2003 - 11:27Der er
9 kommentarer og 1 løsning
admin rolle på database
Jeg har en front og backend database, hvor forms, Q med mere ligger i FE, og tabeller er linket ind i denne fra BE.
Det irretrende er at jeg ikke kan rette i en tabel hvis en bruger sidder på formen til denne. Kan man ikke ( måske med vold )smide en bruger af systemet.
Der er ikke nogen rolle fordeling da jeg aldrig har arbejdet med roller i access.
I grabbed this from CompuServe 3 or 4 years ago. Create a table in the database called "KickEmOff" containing one field, "GetOut", integer value, default 0. Create a function that gets called from a Timer Event on a form that is always up in the application. Function follows. If you want to be nice, bring up a small modal form that displays the text "You are being booted from the database. Auto Exiting in 10... 9... 8... " that gets closed just before everything exits.
Function fGetOut()As Integer Dim RetVal As Integer Dim MyDB As Database Dim MyRS As Recordset On Error Goto Err_fGGO Set MyDB = DBEngine.Workspaces(0).Databases(0) Set MyRS = MyDB.OpenRecordset("KickEmOff", db_Open_Snapshot) If MyRS.EOF and MyRS.BOF Then RetVal = True Goto Exit_fGGO Else If MyRS!GetOut = True Then 'This is where you close down any forms, and quit the database 'I leave this section as an exercise to the creative readers Else RetVal = True End If End If Exit_fGGO: fGetOut = RetVal Exit Function Err_fGGO: 'Note lack of message box on error Resume Next End Function
Now, as the responsible DBA, you simply enter a record into "KickEmOff" with a GetOut value of True (-1) and watch em all bail out like flies. The fastest way I've found to determine if they're all out is if you can delete the .ldb file. Then compact. Then enter the database and delete that record from KickEmOut, or else nobody will be able to work in the database, and they'll all be out for blood...
nej fordi jeg kan ikke erstatte den rettede frontend såfremt der sidder brugere på den gamle. Dermed er databasen 'låst' for overskrivelse, ect når der er brugere på.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.