Domino 9 und frühere Versionen > ND6: Entwicklung
ADO und Username.Filter = Array("User")
robertpp:
Der Fehler tritt schon beim Speichern vom Script auf:
Illegal parenthesized reference: ARRAY
Ich hab das jetzt auch schon probiert:
UserName.Filter = "User"
nur das ist im völlig egal da bekomme ich das Ergebnis wie wenn ich die Zeile nicht geschrieben hätte.
Vielleicht gibt es sonst noch eine Möglichkeit alle user aus der Domaine auszulesen sollte das nicht gehen?
umi:
evtl hilft ja folgendes
dim userarray(1) as string
...
...
userarray(0) = "User"
...
...
UserName.filter=userarray
...
Thomas Schulte:
Meiner Meinung nach kennt er schon das hier warscheinlich nicht.
Set UserName = GetObject("WinNT://" & ComputerName & ",computer")
Schau doch mal im Debugger nach ob er das Object überhaupt zuweist.
Glombi:
In der KBASE gibt es ein Hinweis zu einem ähnlichen Problem:
Title:
Using a Method For a Non-Lotus Object Results in the Error: Automation Object Member Not Found
Product: Lotus Notes > Lotus Notes > Versions 6.x, 5.x
Platform(s): Platform Independent
Date: 25.11.2004
Doc Number: 1085124
Problem
LotusScript code that accesses a third party object (a non-Lotus object) results in the following error when calling methods which contain no parameters:
"Automation object member not found."
The same code logic works within Visual Basic without error.
The following code sample demonstrates this issue. The below code runs on Windows systems to access the Assigned Directories Services (ASDi) object. When the Members method is called, the error occurs:
Dim Group
Dim Member
' Bind to a known group object.
Set Group = GetObject("WinNT://ComputerName/Administrators")
Set member = Group.Members 'The code will error when executing this line
Forall x In member
Print x.name
End Forall
Msgbox group.name ' Returns "Administrators"
Msgbox group.class ' Returns "Group"
Msgbox group.AdsPath ' Returns "WinNT://Domain/ComputerName"
If Group.IsMember("WinNT://Domain/ComputerName/csmith") Then
Msgbox "Already a Member"
Else
group.Add("WinNT://ComputerName/csmith")
End If
Solution
LotusScript requires the use of parentheses when calling the methods of non-Lotus objects, even when the methods do not have any parameters.
From the example above, the Members method call would be made as follows:
Set member = Group.Members()
Within Notes, when working with Notes objects it is recommended, but not required, to use parentheses when calling a method that does not contain any parameters.
For example, both of the following calls to GetFirstDocument (of the NotesDocumentCollection class) run without error:
Set doc = collection.getfirstdocument
Set doc = collection.getfirstdocument()
Supporting Information:
A directory service is basically a database that contains the attributes and locations of shared objects connecting the network. Users that want to access these resources may do so by using a special syntax. An assigned directory service uses a syntax which is called a namespace. For example, //CompanyName/csmith would identify a workstation and a logged-in user. The collection of all workstations and users on the network can be accessed this way from a namespace. A directory service provides a method to manage the data stored in internal tables. You can read and set security flags and descriptions.
The ability to access and/or update the Active Directories depends on the ADSi object control and is available through COM.
It is also important when using the IsMember method, that the complete ADsPath is used.
Related Documents:
Setting Third-Party Object Property to an Object Causes Error: "Automation Object Member Not Found"
Document #: 1084270
Wichtig sind also die Klammern!
Andreas
koehlerbv:
Andreas, das kennt Robert schon - darauf hat er selber verwiesen, und auch das war ein Artikel von Dir ;)
Bernhard
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln