0

I installed my windows form application on another computer and this happens when the reports is opened. Everything works fine on my computer only getting an error for other computers.

The error for other computers: This is the error for other computers

Here is the unhandled exception:

Here is the unhandled exception

// THIS IS MY CODE
if (con.State == ConnectionState.Open)
    con.Close();

try
{
    con.Open();
    string SelectQuery = "SELECT * FROM tblProject";
    SqlCommand command = new SqlCommand(SelectQuery, con);
    SqlDataAdapter DataAdapt = new SqlDataAdapter(command);
    DataSet MyDataset = new DataSet();
    DataAdapt.Fill(MyDataset, "tblProject");
    ProjectDataReport ProjectReport = new ProjectDataReport();
    ProjectReport.SetDataSource(MyDataset);
    con.Close();
    crv1.ReportSource = ProjectReport;
    crv1.Refresh();
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
    crv1.Refresh();
}
finally
{
    con.Close();
}

Working on my computer

popoyskii
  • 1
  • 1
  • 2
    is it mysql or sql-server? They are different products. Can you identify which line is causing the error (maybe don't catch it for a full stacktrace)? – danblack Jun 03 '20 at 06:51
  • Wait I'll send another installer on their computer without catching the exception – popoyskii Jun 03 '20 at 06:57
  • Is one of the computers 64bit and the other 32bit? https://stackoverflow.com/questions/13356765/winforms-crystal-report-failed-to-load-database-information-error – mortb Jun 03 '20 at 07:07
  • @mortb both 64bit – popoyskii Jun 03 '20 at 07:11

0 Answers0