Click here to Skip to main content
15,909,897 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionA faster way to find an item in a bindingsource and return its index Pin
desanti26-Mar-19 14:45
desanti26-Mar-19 14:45 
AnswerRe: A faster way to find an item in a bindingsource and return its index Pin
Eddy Vluggen27-Mar-19 3:36
professionalEddy Vluggen27-Mar-19 3:36 
GeneralRe: A faster way to find an item in a bindingsource and return its index Pin
desanti27-Mar-19 4:25
desanti27-Mar-19 4:25 
GeneralRe: A faster way to find an item in a bindingsource and return its index Pin
Eddy Vluggen27-Mar-19 4:39
professionalEddy Vluggen27-Mar-19 4:39 
QuestionHow to change path from local to server Pin
RedPandinus25-Mar-19 5:10
RedPandinus25-Mar-19 5:10 
AnswerRe: How to change path from local to server Pin
Mycroft Holmes25-Mar-19 19:18
professionalMycroft Holmes25-Mar-19 19:18 
QuestionSearching with special characters Pin
RedPandinus21-Mar-19 2:23
RedPandinus21-Mar-19 2:23 
AnswerRe: Searching with special characters Pin
Richard Deeming21-Mar-19 3:24
mveRichard Deeming21-Mar-19 3:24 
When you store the string in the database, have a second column which stores the string with the accents removed.

When you search, remove the accents from the search string, and search the column without the accents.

How do I remove diacritics (accents) from a string in .NET? - Stack Overflow[^]
VB.NET
Public Shared Function RemoveDiacritics(ByVal text As String) As String
    Dim normalizedString As String = text.Normalize(NormalizationForm.FormD)
    Dim stringBuilder As New StringBuilder()

    For Each c As Char In normalizedString
        Dim unicodeCategory As UnicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c)
        If unicodeCategory <> UnicodeCategory.NonSpacingMark Then
            stringBuilder.Append(c)
        End If
    Next

    Return stringBuilder.ToString().Normalize(NormalizationForm.FormC)
End Function




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Searching with special characters Pin
Mycroft Holmes21-Mar-19 11:41
professionalMycroft Holmes21-Mar-19 11:41 
GeneralRe: Searching with special characters Pin
Richard Deeming22-Mar-19 1:37
mveRichard Deeming22-Mar-19 1:37 
AnswerRe: Searching with special characters Pin
Eddy Vluggen21-Mar-19 4:35
professionalEddy Vluggen21-Mar-19 4:35 
AnswerRe: Searching with special characters Pin
Richard MacCutchan21-Mar-19 5:03
mveRichard MacCutchan21-Mar-19 5:03 
QuestionExporting Access db to Excel Pin
RedPandinus19-Mar-19 1:20
RedPandinus19-Mar-19 1:20 
AnswerRe: Exporting Access db to Excel Pin
Richard Deeming19-Mar-19 2:08
mveRichard Deeming19-Mar-19 2:08 
GeneralRe: Exporting Access db to Excel Pin
RedPandinus20-Mar-19 5:20
RedPandinus20-Mar-19 5:20 
GeneralRe: Exporting Access db to Excel Pin
Richard MacCutchan20-Mar-19 5:36
mveRichard MacCutchan20-Mar-19 5:36 
GeneralRe: Exporting Access db to Excel Pin
RedPandinus20-Mar-19 5:51
RedPandinus20-Mar-19 5:51 
GeneralRe: Exporting Access db to Excel Pin
Richard MacCutchan20-Mar-19 6:07
mveRichard MacCutchan20-Mar-19 6:07 
GeneralRe: Exporting Access db to Excel Pin
Dave Kreskowiak20-Mar-19 8:46
mveDave Kreskowiak20-Mar-19 8:46 
GeneralRe: Exporting Access db to Excel Pin
RedPandinus20-Mar-19 20:08
RedPandinus20-Mar-19 20:08 
GeneralRe: Exporting Access db to Excel Pin
Richard Deeming20-Mar-19 12:35
mveRichard Deeming20-Mar-19 12:35 
GeneralRe: Exporting Access db to Excel Pin
RedPandinus20-Mar-19 20:18
RedPandinus20-Mar-19 20:18 
GeneralRe: Exporting Access db to Excel Pin
Richard MacCutchan20-Mar-19 22:52
mveRichard MacCutchan20-Mar-19 22:52 
GeneralRe: Exporting Access db to Excel Pin
RedPandinus20-Mar-19 23:24
RedPandinus20-Mar-19 23:24 
Questiontextbox allowance Pin
Member 1418376915-Mar-19 4:27
Member 1418376915-Mar-19 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.