?
Solved

how to detect case sensitive? DataView in ADO.NET

Posted on 2004-09-17
2
Medium Priority
?
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

743 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