本文介绍了当我通过使用水晶报表``error(来源:SQL Server的Microsoft OLE DB提供程序描述:用户'sa'登录失败.SQL状态:42000 ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void pARTSSUPPLIEDToolStripMenuItem_Click(object sender, EventArgs e)
{
frmRptList_Parts_Supplied lstpa = new frmRptList_Parts_Supplied();
lstpa.Show();
ReportDocument crReportDocument = new ReportDocument();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crReportDocument.Load("C://Users//Gilbert//Desktop//softNew//softNew//rptList_Parts.rpt");
crReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "catalogueReport.pdf");
//Preview the generated PDF
System.Diagnostics.Process.Start(Application.StartupPath + "\\catalogueReport.pdf");
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
crConnectionInfo.ServerName = "GILBERT-PC";
crConnectionInfo.DatabaseName = "dbAutorec";
crConnectionInfo.UserID = "sa";
crConnectionInfo.Password = "newgt";
}
推荐答案
这篇关于当我通过使用水晶报表``error(来源:SQL Server的Microsoft OLE DB提供程序描述:用户'sa'登录失败.SQL状态:42000 ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!