如何将MySQL密码更改为CrystalReport [英] How can I change the MySQL password to a CrystalReport

查看:71
本文介绍了如何将MySQL密码更改为CrystalReport的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个使用Crystal Report的应用程序.
我的数据库使用密码,在我的电脑上也可以.但是,如果我需要在另一台使用不同的mysql密码的电脑上安装应用程序,该怎么办?

我在.NET C#获胜表格中所拥有的全部是:

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();
}


似乎可以正常工作,我对其进行了测试,将密码更改为另一个密码",但未连接到dababase(按预期方式)
您如何看待该解决方案?


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?

推荐答案

您可以使用TableLogonInfo [

这篇关于如何将MySQL密码更改为CrystalReport的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆