--------------------------- 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.
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"); } }
<startup useLegacyV2RuntimeActivationPolicy="true"></startup>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)