Hey team, i'm having a problem with this query,
"SELECT * FROM marketingDB WHERE company_name LIKE 'allied' & '*'"
the program ive written runs fine and it doesnt show any problem with the query infact the exact same query works fine on access but when i put it on vb the datagrid comes back empty and I believe the datagrid works as with other simpler queries it returns stuff. The database is called vbDataBase and the table im, attempting to read from is called marketingDB.
The naming of everything is fine because it builds the program fine, post the whole code below;
'TODO: This line of code loads data into the 'VbDataBaseDataSet.marketingDB' table. You can move, or remove it, as needed. Me.MarketingDBTableAdapter.Fill(Me.VbDataBaseDataSet.marketingDB) Dim cn As New OledbConnection() cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Wise-fps01\shared\vbDataBase.mdb" cn.Open() Dim command As OleDbCommand = New OleDbCommand("SELECT * FROM marketingDB WHERE company_name LIKE 'allied' & '*' ", cn) command.CommandType = CommandType.Text Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(command) Dim table As New DataTable adapter.Fill(table) cn.Close() DataGridView1.DataSource = table DataGridView1.Update()
Any help you can give me would be greatly appreciated, I will post any other data you need. Just let me know.