Ciao a tutti,
oggi sono impazzito con una query fatta con vb.net associato ad un db access:

strSql = Concat("SELECT DISTINCT CLI FROM ", tab, " WHERE POS LIKE '", pos.Substring(0, 6), "*'")
selezione = New OleDb.OleDbDataAdapter(strSql, archivioMese)
selezione.Fill(DataSet1, tab)
archivioMese.Close()

For j = 0 To DataSet1.Tables(tab).Rows.Count - 1
If arrayClienti.Contains(DataSet1.Tables(tab).Rows(j) ("CLI")) = False Then
arrayClienti.Add(DataSet1.Tables(tab).Rows(j)("CLI "))
arrayClienti.Sort()
End If
Next

con questa stringa il vb.net non trova nessun record, invece se sostituisco la mia stringa con questa:

strSql = Concat("SELECT DISTINCT CLI FROM ", tab, " WHERE left(POS, 6) = '", pos.Substring(0, 6), "'")

i record compaiono correttamente.

Sapete se c'è qualche errore in vb.net che non riesce ad associare l'operatore like?

Grazie in anticipo

Andrea