Hello, I have an application that uses a Crystal Report.
My database uses a password and it's okay in my pc. But what do I have to do if I need to install the application in another pc with a different mysql password?
All I have in my .NET C# win form is:
private void VReport_Load(object sender, EventArgs e)
{
this.proyTableAdapter.Fill(this.DataSet1.proy);
this.reportViewer1.RefreshReport();
}
Another important thing: I DON'T KNOW ALMOST ANYTHING ABOUT CRYSTAL REPORTS. I want to use it because it's easy and looks good as I see, but I don't know many things, so please help me step by step. Just as a child. Thanks a lot.
One more thing: What about adding this codelines at the beginning of the initial method?
private void VReport_Load(object sender, EventArgs e)
{
this.proyTableAdapter.Connection =
MySql.Data.MySqlClient.MySqlConnection
("datasource=localhost;username=root;" +
";password=anotherpassword;database=ctrlturnos");
this.proyTableAdapter.Fill(this.DataSet1.proy);
this.reportViewer1.RefreshReport();
}
Seems like it works, I tested it changing the password to 'anotherpassword' and it didn't connect to the dababase (as expected)
What do you think about this solution?