473,624 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to fill a drop down list with all company users, but...

I am new to .NET (and directory services) and I need to fill a drop down list box with the users of my company. I am trying to use the code shown below, but I get this error message when the line of code with the "For" statement runs: "System.Runtime .InteropService s.COMException: The specified domain either does not exist or could not be contacted
Can anyone give me any ideas as how to resolve this? Any and all help would be greatly appreciated. Thanks
Dim DirSearch As New DirectorySearch er(userDSE
DirSearch.Searc hScope = SearchScope.Sub tre
DirSearch.Prope rtiesToLoad.Add ("name"
DirSearch.Prope rtiesToLoad.Add ("mail"
DirSearch.Filte r = "(objectcategor y=user)
For Each sr As SearchResult In DirSearch.FindA ll <-- ERROR OCCURS HER
Dim li As New ListIte
li.Text = sr.Properties(" Name")(0
li.Value = sr.Properties(" Name")(0
ddlReporter.Ite ms.Add(li
Next
Jul 21 '05 #1
1 1628
Hi Rickl,

I do not know the answer of your problem, I can give you the answer to check
for IS nothing before however that gives no answer.

When I was you I would try it as well in the newsgroups
microsoft.publi c.dotnet.langua ges.vb
microsoft.publi c.dotnet.securi ty
microsoft.publi c.dotnet.framew ork 'wmi small however active newsgroup

And then crosspost it that means one messages to more newsgroups in one
time.

I hope you find your answer,

Cor
I am new to .NET (and directory services) and I need to fill a drop down list box with the users of my company. I am trying to use the code shown
below, but I get this error message when the line of code with the "For"
statement runs: "System.Runtime .InteropService s.COMException: The specified
domain either does not exist or could not be contacted" Can anyone give me any ideas as how to resolve this? Any and all help would be greatly appreciated. Thanks.

Dim DirSearch As New DirectorySearch er(userDSE)
DirSearch.Searc hScope = SearchScope.Sub tree
DirSearch.Prope rtiesToLoad.Add ("name")
DirSearch.Prope rtiesToLoad.Add ("mail")
DirSearch.Filte r = "(objectcategor y=user)"
For Each sr As SearchResult In DirSearch.FindA ll <-- ERROR OCCURS HERE
Dim li As New ListItem
li.Text = sr.Properties(" Name")(0)
li.Value = sr.Properties(" Name")(0)
ddlReporter.Ite ms.Add(li)
Next

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8561
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the column below. The viewer can select states from the drop down lists above the other two columns as well. If the viewer selects only one, only one column fills. If the viewer selects two states, two columns fill. Etc. I could, if appropriate, have...
3
4021
by: google | last post by:
This is something I've done plenty of times in '97, but I can't seem to get it to work correctly in Access 2003. Say, for example, I have a form with an unbound combobox, the data source is a table of customers, first column is the key field, which is hidden with a 0" width, and the second column is the customer name. The SQL is a union query that also inserts Null in the first column, and "All" in the second column. That combobox gets...
1
2043
by: csgraham74 | last post by:
Hi Guys, I am currently building a web aplication in ASP.Net. On the onload event of a page a have a function to populate the many drop down lists on my page. I have one parameter table which stores all the values e.g. Title,Type,Status,Property,Occupation. I am using a sql string and then populationg my drop down list
1
321
by: RickL | last post by:
I am new to .NET (and directory services) and I need to fill a drop down list box with the users of my company. I am trying to use the code shown below, but I get this error message when the line of code with the "For" statement runs: "System.Runtime.InteropServices.COMException: The specified domain either does not exist or could not be contacted Can anyone give me any ideas as how to resolve this? Any and all help would be greatly...
2
4553
by: Ren | last post by:
Hi all, I am a bit new to PHP and SQL so this may seem like a dumb question. I have already created a drop down list as part of a form which is automatically populated with values taken from a separate database. When a user goes onto this page and either leaves the default value or selects a value from the drop down list and presses the submit button, I would like that selected value to be stored into a database which I have already...
3
7345
by: penny111 | last post by:
Hi there, For my application, i need to have 3 drop down lists 1. drop down list of folder names 2. drop down list of documents in the folder selected 3. drop down list of instances of the document selected (my application uses the BusinessObjects Java Web Services SDK) The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do -select a folder from the...
4
14174
by: magmike | last post by:
I've got a control on my form that allows the user to select a record based on a form field (in this example, the drop down menu shows the company name, followed by the contact name but uses the contactid to change the data on the form). Most users, start typing the company name which will auto complete itself with the first entry with the letters typed so far. They can then click on the arrow to view the listings, select the one they want...
2
1170
by: Boheim | last post by:
I have two controls on my page: 1) A list box 2)A drop down list I want my users to be able to select from the drop down list and the related data be shown in the list box. For example: lets say the data in the combo box were the names of various students. I want the users to select a student name and then their classes be listed in the list box. I am using a database. please help. It is greatly appreciated.
1
1340
by: Boheim | last post by:
I have two controls on my page: 1) A list box 2)A drop down list I want my users to be able to select from the drop down list and the related data be shown in the list box. For example: lets say the data in the combo box were the names of various students. I want the users to select a student name and then their classes be listed in the list box. Ok. This is my code so far.
0
8249
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8685
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8348
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7176
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.