Hi,
I am currently working with visual studio 2010 and MS access DB. i ahve installed crystal reports 2008. I use windows forms and a crystal reports viewer control in it. On a button click i want to show a report from database in a crystal reports viewer. But i encounter the following error message.
---------------------------
Crystal Reports Viewer
---------------------------
Failed to load database information.
Details: The database connector 'crdb_p2bbnd.dll' could not be loaded. The correct version of the database client for this database type might not be installed.
here is the code
string connetionString = null;
OleDbConnection cnn;
DataTable OledbDt = new DataTable("Table Name from the database");
OleDbDataAdapter OleDbAdapter = new OleDbDataAdapter();
string sql = null;
connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=XXXXX.mdb;";
sql = "select * from Table name from the database";
cnn = new OleDbConnection(connetionString);
try
{
cnn.Open();
OleDbAdapter = new OleDbDataAdapter(sql,cnn);
OleDbAdapter.Fill(OledbDt);
ReportDocument rptDoc = new ReportDocument();
my rpt file name abc = new my rpt file name();
abc.SetDataSource(OledbDt);
crystalReportViewer2.ReportSource = abc;
crystalReportViewer2.RefreshReport();
OleDbAdapter.Dispose();
cnn.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message,"Error");
}
}
i searched my entire system but i coudn't find the dll to be added here. i googled out the error message but got reuslts with there is no such dll. kindly help me out with this issue as soon as possible. Many Thanks in advance