RadComboBox with date

1 posts, 0 answers
  1. Jorge
    Jorge avatar
    11 posts
    Member since:
    Jul 2011

    Posted 21 Jul 2011 Link to this post

    Hi everyone!
    I'm from brazil so i don't speak english very well... sorry! :-\
    I have a little problem here..
    When a put a date in RadCombo to used autocomplete function it bring me result but not to show anything...
    It show me result only if i put a string (word..etc..)
    Why?

    My search code:

    Dim exp As String = "(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"
    Dim sql As String = ""
    Dim DATE_EXP As System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(e.Text, exp)
     
    sql = "SELECT NAMECOLUMNS from TABLE "
            If DATE_EXP .Success Then
                sql += " where CONVERT(VARCHAR(12),DATE_COLUMN,103) = CONVERT(VARCHAR(12), '" & e.Text & "', 103) "
            Else
                sql += " WHERE OTHERCOLUMN LIKE '%" + e.Text + "%'"
            End If
          
    SessionDataSource1.SelectCommand = sql
     
Back to Top