Is there anyone know how to use LIKE statement?
Try this code.
private void button1_Click(object sender, EventArgs e)
OleDbConnection conn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Northwind.mdb");
String sqlText = "SELECT * FROM Customers WHERE CompanyName LIKE '%" + textBox1.Text + "%'";
OleDbDataAdapter adapter = new OleDbDataAdapter(sqlText, conn);
DataTable dtCust = new DataTable();
dataGridView1.DataSource = dtCust;
Also refer this link.
Microsoft Office Access 2007 - Like Operator
sorry..i'm new in c#..i got this error..
Line 27: OleDbDataAdapter adapter = new OleDbDataAdapter(sqlText, conn);
Line 28: DataTable dtCust = new DataTable();
Line 29: adapter.Fill(dnis);
Line 30: conn.Close();
Line 31: dataGridView1.DataSource = dnis;
Please see my post vbScript - The Basics for more details on vbScript.
vbScript has a number of functions for converting from one ...
hello hope you all are going well, so my vacation is comming and i was wondering whta if i did a big project or small project, how hard is it ...
Sorting is something that must be done from time to ...