Ja,
man muß nur alles selbst tun,
Session aufmachen, login, ..
Beispiel in VB
Sub Main()
Set fso = CreateObject("Scripting.FileSystemObject")
Set smEngine = New SmApplic.SmFreeThreadedEngine
If Not smEngine Is Nothing Then
smEngine.Init "SmTeam32"
Set smSession = New SmApplic.smSession
smSession.Init smEngine, "ST Safety", smEngine.ConfigurationName
If Not smSession Is Nothing Then
Set fs = fso.OpenTextFile("STsafety.ini", ForReading, False)
Line = fs.ReadLine()
Line = fs.ReadLine()
pos = InStr(Line, ";")
DatabaseName = Left(Line, pos - 1)
Line = Mid(Line, pos + 1)
pos = InStr(Line, ";")
DataBasePassword = Left(Line, pos - 1)
Line = Mid(Line, pos + 1)
pos = InStr(Line, ";")
UserName = Left(Line, pos - 1)
Line = Mid(Line, pos + 1)
pos = InStr(Line, ";")
UserPassword = Left(Line, pos - 1)
fs.Close
Set fs = fso.OpenTextFile("STsafety.log", ForAppending, True)
smSession.OpenDatabaseConnection DatabaseName, DataBasePassword, False
If smSession.UserLogin(UserName, UserPassword) Then
MsgBox "Userlogin erfolgreich!"
Else
MsgBox "Fehler: Userlogin nicht erfolgreich!"
End If
fs.Close
smSession.Close
Set smSession = Nothing
Else
MsgBox "Fehler: smSession nicht initialisiert!"
End If
smEngine.Terminate
Set smEngine = Nothing
Else
MsgBox "Fehler: smEngine nicht initialisiert!"
End If
End Sub
------------------
Gruß Ingo
Leipzig 2012
one family
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP