1
Reply

Connection Establishment Problem

manish pandey

manish pandey

Jun 22 2013 10:33 AM
1k

Hello , 
Please help me ...
i am getting run time exception in this code. (Could not find installable ISAM.)
i m just trying to establish connection with my access database. 

 private void button1_Click(object sender, RoutedEventArgs e)
        {
            //MessageBox.Show(textBox1.Text.ToString());
            OleDbConnection con = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = E:\\Access\\test.mdb; Persist Security =false;");
           
            OleDbCommand cmd = new OleDbCommand("select * from student", con);
            con.Open();
            OleDbDataReader dr = cmd.ExecuteReader();
            while (dr.Read())
            {
                MessageBox.Show(dr["age"].ToString());
            }
            con.Close();
            
        }

Please help me in this.


Answers (1)