.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Case sensitive LDAP query

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :Windows Application

Hi, I am very new to AD and querying it. If you can, how do you specify case sensitivity in the LDAP query?

I have a series of methods that convert a lamda expression into an LDAP query but i don't know the syntax for case-sensitive searching.

The field it is searching is case-insensitive but as it is a base attribute i don't want to modify it.

Any ideas would be appreciated


View Complete Post

More Related Resource Links

Query help to write case statement in Where clause?

Hi All, I have table something like this:- SELECT UserName, IsManager FROM Employee IsManager has only two values either 1 (which means user is a Manager) or 0 (which means user is not a Manager) Now I want to write below query:- DECLARE @IsManager INT SET @IsManager = 2 SELECT UserName, IsManager FROM Employee WHERE IsManager = CASE WHEN @IsManager = 1 THEN 1 WHEN @IsManager = 0 THEN 0 WHEN @IsManager = 2 THEN 1 | 0 ----- THIS IS NOT WORKING, when I set @IsManager value to 2 then where clause should be like this "IsManager = 1 OR IsManager = 0" END Can anybody help me out in modifying about query so that it produces both the results when @IsManager variable value "2". Thanks Regards, Kumar

Using CASE statement in "IN" clause of query


I have a sql datasource with the ControlParameter called ddlDropDownList.

2 questions:

1. Is my syntax below ok, I am getting a runttime error that the syntax is incorrect.

2. I have the select statement set up the control parameter to get the selected value from the dropdownlist as shown below, is that syntax correct?  especially the "selectedItem.value" for the propertyname property. thx

select fieldOne, fieldTwo from someTable where fieldOne IN 
CASE WHEN @ddlDropDownList='valueABC' THEN ('ABC') WHEN @ddlDropDownList='valueDEF' THEN ('DEF') 

<asp:ControlParameter ControlID="ddlDropDownList" Name="typeSlctd" PropertyName="SelectedItem.Value" Type="String" />

LDAP Query To Move User From One OU To Another


Hi does anyone have a complete example in ASP.NET VB to find move a User in Active Directory From  one OU to another, any help would be great




LDAP Query is not working


Hi All,


we are using SharePoint 2007.


We are facing a peculiar problem and need your help/ suggestions:


Problem Statement: The Intranet is importing user profiles based on a ldap query and user filter defined in central admin. The user filter selectively rejects “not active” profiles and profiles that belong to a user group: NonIT_Staff (this group is used to store profiles who have left organization or some selected admin accounts)


The user filter used is: (&(objectCategory=person)(

Case Sensitive Regular Expression

I need help with a regular expression.

I have the following regular expression that validates a UK Post Code.

(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW]) [0-9][ABD-HJLNP-UW-Z]{2})

How can I make this case insensitive as currently this only validates correctly if uppercase letters are used in the correct structure and not lower case.

new query - braces, case sensitivity, database names now required? TURN IT OFF PLEASE?


call me stupid or whatever, i don't care.

i have found the new query editor in 2008 have the most restrictive and pain in the a$$ feature i have ever seen.
every query now requires brackets, fully qualified dabase name + table + column for reference.

WHY am i required to type the name of the database i'm querying in a stored procedure?  COMPLETELY POINTLESS!
PLUS on top of all of that, the junk is CASE SENSITIVE.  if i wanted to waste time worrying about caps, braces and meaningless syntactical characters,  i would write code in C#.

the reason why this is SUCH AN INCONVENIENCE is that the database i am writing against has HUNDREDS of tables.
additionally, i've used 2005 for years and i really find it highly inconvenient to use the same tool as before but now i need to write queries in proper english and case.

here's a quick example: 
previously i could type 'select top 5 zipcode from shipment
NOW with the new and improved pain in the a$$ feature i have to type:
'select top 5 '[databasename].[dbo].[shipment].[zipcode] from [databasename].[dbo].[shipment]'
that might not be an exact example but you get the idea.

maybe i just don't know what the new intellisense feature is that controls this?
somebody please help me figure out how to turn off this restriction, it is

WebImage is case sensitive on extensions (GIF vs gif)

I was messing about with WebImage and found that either webImage or the html <input type="file" ...> is fussy about the case of file extensions.
Specifically, I wrote a little code to let the user browse the PC's files and select an image file to upload then have WebImage save it off to the images directory of my website.
Turns out that when the filename is "myImage.GIF" the result is a null value from WebImage.GetImageFromRequest()
If the filename is changed to "myImage.gif" everything works fine and the file is, indeed, saved.  I haven't tried it with the other extensions, but this could be a possible explanation if others find inconsistent results from WebImage.GetImageFromRequest() 

Visual Case Tool - UML Tutorial

The Class Diagram

The class diagram is core to object-oriented design. It describes the types of objects in the system and the static relationships between them.

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

Use Case Diagram

The use case diagram shows the functionality of the system from an outside-in viewpoint.

Actors (stick men) are anything outside the system that interacts with the system.

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

Content Query Web Part missing in SharePoint 2010

If you don't see content query web part listed in the web parts list, this is because you have not enabled "Search Server Web Parts" feature in site collection features. Enable this feature and content query web part will show in the list of web parts.

sql query that don't run



I'm going crazy... i've got a piece of code that don't update the database... Could somebody tel me why it doesn't run??

Dim conn As SqlConnection
        Dim cmd As SqlCommand
        Dim cmdstring As String = "Update Corsi Set [Contenuto]='" & TxtText.Content & "' Where [ID]='" & Request.QueryString("Id").Replace("'", "") & "'"
        conn = New SqlConnection(SqlAnni.ConnectionString)
        cmd = New SqlCommand(cmdstring, conn)

Need help with a linq to sql query


I want to display some stats in a listview contril.  The table contains a record for every impression and for every click, and every record has a datetime field for the time and date of the impression of click.  I want to be able to display how many impressions and clicks there were in a given day and hour, something like below:

Date              Time                              Impressions    Clicks
8/20/2010                                               450              14            
                     Midnight -1:00am               150               5

How to send an email with information in query string


First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;

I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;

I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.

Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;

Thank you if you can point me in the right direction.

Get Member from LDAP using C# 2.0


I'm currently writing a process where I need to determine if an User on my LDAP string is an Admin.

How can I accomplish this?  What would be the easy and quickest way?

I've been trying to use the code below..... Any feedback is greately appreciated. Tks



Combining two LDAP queries


Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?
Query 1: (&(!cn=SystemMailbox{*})(&(&(ou>="")(name=executive*)(objectCategory=organizationalUnit)(ou=*operations))))
Query 2: (&(!cn=SystemMailbox{*})(&(ou>="")(name=50*)))
Thanks in advance.

Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend