title: I am not able to fetch single record from access database in C#.Net
body: <p>I am doing project on Library Management System. I want to fetch the all data about the student using the borrower number by select query. But my Code is not working Its giving some exception as type mismatch in criteria expression at line number 40 dAdapter.Fill(dataTable);. Please Help Me. Here is my Code.
  THANK YOU :)</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Data.OleDb;
  
  namespace LibraryManagment
  {
  public partial class ViewStudent : Form
  {
      private OleDbConnection bookConn;
      private OleDbCommand oleDbCmd = new OleDbCommand();
      //parameter from mdsaputra.udl
      private String connParam = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\mini\database\library.mdb;Persist Security Info=False";
  
  
  
      public ViewStudent()
      {
          bookConn = new OleDbConnection(connParam);
          InitializeComponent();
      }
  
      private void btnView_Click(object sender, EventArgs e)
      {
          dataGridView1.DataSource = null;
          dataGridView1.Rows.Clear();
          dataGridView1.Refresh();
  
          OleDbDataAdapter dAdapter = new OleDbDataAdapter("select * from Student where BorrowerNo = '"+ this.txtBorrowerNo.Text +"';", connParam);
          OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(dAdapter);
  
          DataTable dataTable = new DataTable();
          DataSet ds = new DataSet();
  
          dAdapter.Fill(dataTable);
  
          for (int i = 0; i &lt; dataTable.Rows.Count; i++)
          {
              dataGridView1.Rows.Add(dataTable.Rows[i][0], dataTable.Rows[i][1], dataTable.Rows[i][2], dataTable.Rows[i][3], dataTable.Rows[i][4], dataTable.Rows[i][5], dataTable.Rows[i][6], dataTable.Rows[i][7]);
          }
      }
  
  
          private void ViewStudent_Load(object sender, EventArgs e)
          {
              // TODO: This line of code loads data into the 'libraryDataSet.Student' table. You can move, or remove it, as needed.
             // this.studentTableAdapter4.Fill(this.libraryDataSet.Student);
  
          }
  
  
  }
  </code></pre>
  
  <p>}</p>