Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2004, 05:56 AM
Authorized User
 
Join Date: Aug 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Alcapone
Default Howto create Distribution list

Hi,

Anybody have any idea how to create a distribution list?

Must thanks!!!
 
Old November 1st, 2004, 06:25 AM
Authorized User
 
Join Date: Aug 2004
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Alcapone
Default

This is the code i use:

DirectoryEntry objEntry;
DirectoryEntry objNewEntry;
objEntry = new DirectoryEntry(strPath);
DirectoryEntry ou = objEntry.Children.Find("OU=Distribution") ;
objNewEntry = ou.Children.Add("cn="+cmb_curs.SelectedItem.ToStri ng(), "group") ;
objNewEntry.Properties["groupType"].Value = ActiveDs.ADS_GROUP_TYPE_ENUM.ADS_GROUP_TYPE_GLOBAL _GROUP ;
objNewEntry.CommitChanges();

After running the code it gives me the follwing error:
A constraints violation occured

Anybody have any idea why i get this error?

Regards,
Martijn





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a list box containing available printers Grimgore VB How-To 1 October 29th, 2008 01:56 AM
Create a Collapsible List AnithaReddyKora ASP.NET 2.0 Basics 0 December 13th, 2005 06:40 AM
Error - Cannot create a child list akibaMaila VB.NET 2002/2003 Basics 1 January 20th, 2005 04:15 PM
howto create sybase dsn ? qwjunk Access 0 August 24th, 2004 09:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.