Solved

how to detect case sensitive? DataView in ADO.NET

Posted on 2004-09-17
2
209 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
Comment Utility
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
Comment Utility
Yup it works! thanks!!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

772 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

12 Experts available now in Live!

Get 1:1 Help Now