VB.Net - OleDbDataAdapter and allowed functions RRS feed

  • Question

  • I'm using OleDbDataAdapter to fill a DataGridView. All works fine

    The only problem is that i want to use UPPER function but it shows an error"ExecuteCommandTextErrorHandling"

    I need to use LEFT JOIN's and maybe other stuff..

    Is there a list of supported Commands/Functions ?

    Just for the record, this is the code

    Dim where As String
        Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path.GetDirectoryName(Application.ExecutablePath) & ";Extended Properties=dBASE IV;"
        Dim myConnection As New OleDbConnection
        myConnection.ConnectionString = connString
        Dim comando As String
        comando = "SELECT * FROM client WHERE UPPER(NOMBRE) LIKE '%" & txtNombre.Text.ToUpper & "%'"
        ' ojo - la tabla debe ir en minusculas, de lo conrario no funciona
        Dim da As OleDbDataAdapter = New OleDbDataAdapter(comando, myConnection)
        Dim ds As DataSet = New DataSet
        GridClientes.DataSource = ds.Tables(0)
    Sunday, December 19, 2010 6:08 AM


All replies