Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

aktuelle Benutzerzugriffe im Netz ermitteln -> ldb auslesen?

213 views
Skip to first unread message

Frank Hilwalserbäumer

unread,
Apr 28, 1998, 3:00:00 AM4/28/98
to

Ich habe eine Datenbank auf einem Novell-Server im Netz liegen und benötige
eine Funktion, mit der ich aus der Datenbank heraus zur Laufzeit ermitteln
kann, wer gerade alles darauf zugreift (Sicherheitssystem in System.mda ist
aktiviert, die Benutzer melden sich in Access 2.0 an). Ich habe irgendwo mal
gelesen, daß die Zugriffe in die ldb-Datei geschrieben werden. Wie kann ich
sie von dort auslesen.

Danke!

Frank Hilwalserbäumer
_____________________________
frank.hilwa...@gmx.net

Bernhard Funk

unread,
Apr 28, 1998, 3:00:00 AM4/28/98
to

hi!

bei microsoft liegt der file 'jetutils.exe', der auch ein programm
namens'ldbview' (32-bit) enthält, mittels dem man die
benutzerinformationen aus der ldb auslesen kann (auch für
a2-datenbanken). die adresse lautet:
http://support.microsoft.com/support/downloads/LNP126.asp?PR=ACC&FR=0&M=S&

hth
bernhard

Michael Steinböck

unread,
Apr 28, 1998, 3:00:00 AM4/28/98
to

Bernhard Funk schrieb in Nachricht <354569c...@nntp.rz.uni-sb.de>...

>hi!
>
>bei microsoft liegt der file 'jetutils.exe', der auch ein programm
>namens'ldbview' ....

ISS JA GAR NICHT NÖTIG!
kopier das in eine Form mit einem Ausgabefeld "Whoson"

Michael

'---------------------------------------------------------------------------
----------
' Subject : WhosOn()
' Purpose : Will read *.LDB file and read who's currently
' logged on and their station name.
' The LDB file has a 64 byte record.
' The station name starts at byte 1 and is null
' terminated.
' Log-in names start at the 33rd byte and are
' also null terminated.
' I had to change the way the file was accessed
' because the Input() function did not return
' nulls, so there was no way to see where the
' names ended.
'---------------------------------------------------------------------------
----------
Private Function WhosOn() As String

On Error GoTo Err_WhosOn

Dim iLDBFile As Integer, iStart As Integer
Dim iLOF As Integer, i As Integer
Dim sPath As String, x As String
Dim sLogStr As String, sLogins As String
Dim sMach As String, sUser As String
Dim rUser As UserRec ' Defined in General
Dim dbCurrent As Database

' Get Path of current database. Should substitute this code
' for an attached table path in a multi-user environment.

Set dbCurrent = DBEngine.Workspaces(0).Databases(0)
sPath = dbCurrent.Name
dbCurrent.Close

' Iterate thru dbCurrent.LDB file for login names.

sPath = Left(sPath, InStr(1, sPath, ".")) + "LDB"

' Test for valid file, else Error

x = Dir(sPath)
iStart = 1
iLDBFile = FreeFile

Open sPath For Binary Access Read Shared As iLDBFile
iLOF = LOF(iLDBFile)
Do While Not EOF(iLDBFile)
Get iLDBFile, , rUser
With rUser
i = 1
sMach = ""
While .bMach(i) <> 0
sMach = sMach & Chr(.bMach(i))
i = i + 1
Wend
i = 1
sUser = ""
While .bUser(i) <> 0
sUser = sUser & Chr(.bUser(i))
i = i + 1
Wend
End With
sLogStr = sMach & " -- " & sUser
If InStr(sLogins, sLogStr) = 0 Then
sLogins = sLogins & sLogStr & ";"
End If
iStart = iStart + 64 'increment to next record offset
Loop
Close iLDBFile
WhosOn = sLogins

Exit_WhosOn:
Exit Function

Err_WhosOn:
If Err = 68 Then
MsgBox "Couldn't populate the list", 48, "No LDB File"
Else
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description
Close iLDBFile
End If
Resume Exit_WhosOn

End Function

Stefan Daxenbichler

unread,
Apr 29, 1998, 3:00:00 AM4/29/98
to

Wird sofort eingebaut! Könntest Du bitte noch die fehlende
Definition von UserRec nachliefern?

Michael Steinböck schrieb in Nachricht
<35460...@news.telekabel.at>...

>Private Function WhosOn() As String

...

Klaus Oberdalhoff

unread,
Apr 29, 1998, 3:00:00 AM4/29/98
to

Hi,

Private Type UserRec
bMach(1 To 32) As Byte ' 1st 32 bytes hold machine name
bUser(1 To 32) As Byte ' 2nd 32 bytes hold user name
End Type

mfg

Klaus

PS:Tips und Tricks zu ACCESS 97 (erweiterte KnowHow-MDB Ver 1.3: 30.3.98)
unter
http://members.aol.com/HLanger51/index.html

PPS: Bitte XXNOSPAMXX aus meiner E-mail-Adresse entfernen


Stefan Daxenbichler schrieb in Nachricht <6i6nd7$qbm$2...@garion.telecom.at>...

Klaus Oberdalhoff

unread,
Apr 29, 1998, 3:00:00 AM4/29/98
to

Hi,

das LDBUtil ist auch als separater Auszug auf den KnowHow Seiten erhältlich
(Ist dann "nur" 150 kB).

Frank Hilwalserbäumer

unread,
Apr 29, 1998, 3:00:00 AM4/29/98
to

Funktioiert so mit Access 2.0 leider nicht. Beim Kompilieren meckert Access
bei ".bMach(i)", ".bUser(i)" und kennt auch "with ... end with" nicht. Ist
die Prozedur vielleicht von Access 97?

Welcher Code müßte unter Access 2.0 verwendet werden?

Frank Hilwalserbäumer
_____________________________
frank.hilwa...@gmx.net

Michael Steinböck schrieb in Nachricht <35460...@news.telekabel.at>...

>Bernhard Funk schrieb in Nachricht <354569c...@nntp.rz.uni-sb.de>...
>

>kopier das in eine Form mit einem Ausgabefeld "Whoson"
>

>'--------------------------------------------------------------------------


-
>----------
>' Subject : WhosOn()
>' Purpose : Will read *.LDB file and read who's currently
>' logged on and their station name.
>' The LDB file has a 64 byte record.
>' The station name starts at byte 1 and is null
>' terminated.
>' Log-in names start at the 33rd byte and are
>' also null terminated.
>' I had to change the way the file was accessed
>' because the Input() function did not return
>' nulls, so there was no way to see where the
>' names ended.
>'--------------------------------------------------------------------------
-
>----------

>Private Function WhosOn() As String
>

>On Error GoTo Err_WhosOn
>
> Dim iLDBFile As Integer, iStart As Integer
> Dim iLOF As Integer, i As Integer
> Dim sPath As String, x As String
> Dim sLogStr As String, sLogins As String
> Dim sMach As String, sUser As String

> Dim rUser As UserRec ' Defined in General

0 new messages