Solved

how to detect case sensitive? DataView in ADO.NET

Posted on 2004-09-17
2
215 Views
Last Modified: 2008-02-01
Hi, I am using FindRows to find if the Username & Password exist in the database, if so, it should says "Correct" in debug, which indeed it works.

But I have a problem that it is not case-sensitive.

I would like the user to type the exact name & password (case sensitive).

Can anyone help me please? many thanks.


 Dim dvCheck As DataView = New DataView(dsLoginDetails.Tables("LoginDetails"), "", _
                                        "Username, Password", _
                                        DataViewRowState.CurrentRows)

        Dim foundRows() As DataRowView = _
                dvCheck.FindRows(New Object() {txtUsername.Text, txtPassword.Text})

        If foundRows.Length = 0 Then
            Debug.WriteLine("No match found.")
        Else
            Dim myDRV As DataRowView
            For Each myDRV In foundRows
                Debug.WriteLine("Correct")
            Next
        End If
0
Comment
Question by:staines
2 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 125 total points
ID: 12090159
With this

dsLoginDetails.CaseSensitive = true
or
dsLoginDetails.Tables("LoginDetails").CaseSensitive = true

will affect the case-sensivity comparison in the DataRowView searching using Find or FindRows.
0
 

Author Comment

by:staines
ID: 12090333
Yup it works! thanks!!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question