Hi,
in my current project, i have to read data from Access 95 database and insert into MySQL database,
Using following Syntex but i am not able to read data from Access 95 database, same code is working with Access 97 or above databases but its not working with this file.
public DataTable getData()
{
OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\Test1.mdb;Uid=Admin;Pwd=testPassword;");
DataTable dt = new DataTable();
try
{
string sql = "select * from docket";
OleDbDataAdapter da = new OleDbDataAdapter(sql, cn);
da.Fill(dt);
dataGridView1.DataSource = dt;
}
catch (Exception err)
{
messagebox.Show(err.Message);
}
finally
{
cn.Close();
}
return dt;
}
Please help me to solve this issue.
Thanks in Advance...
Rohit Gupta