Solved

how to detect case sensitive? DataView in ADO.NET

Posted on 2004-09-17
2
213 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Form design in vb.net 7 34
Vb.Net Date Formatting Assistance 4 35
VB.Net Serial COM1 Port - how to send this text via Serial COM port? 13 41
Vb. Net application freezes 9 28
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now