如何解决错误数据库供应商代码 17
How to solve error Database Vendor Code 17
我有 windows 应用程序并且我使用 crystal 报告它在我的本地机器上工作正常但是当部署它时我得到这个错误 无法打开连接详细信息:[数据库供应商代码 17] temp 21323asdasdfv-dfdsfc-dsfdsrxdfdf}.rpt 详细信息:[数据库供应商代码 17]
这是我的代码 运行 报告加载时
string LogonInfo = CONN.GetDataBaseLogon(); //Get Connection string from XML file
string[] Log = LogonInfo.Split(',');
SqlConnection Con = new SqlConnection(CONN.GetSqlConnectionString());
string Command = "USE MainDB; EXEC [dbo].[GetAllSalaf] ;";
DataSet DS = new DataSet();
SqlDataAdapter SAD = new SqlDataAdapter(Command, Con);
SAD.Fill(DS);
NewReports.Reports.AllSalaf S = new Reports.AllSalaf();
S.SetDataSource(DS);
// Log[0] =User Id ,Log[1] password Log[2] Server name
S.SetDatabaseLogon(Log[0], Log[1], Log[2], "MainDB");
crystalReportViewer1.ReportSource = S;
crystalReportViewer1.Refresh();
检查:
- Crystal 报告 运行 时间。
- 如果报告存在于您的项目部署电脑或服务器中?
我有 windows 应用程序并且我使用 crystal 报告它在我的本地机器上工作正常但是当部署它时我得到这个错误 无法打开连接详细信息:[数据库供应商代码 17] temp 21323asdasdfv-dfdsfc-dsfdsrxdfdf}.rpt 详细信息:[数据库供应商代码 17] 这是我的代码 运行 报告加载时
string LogonInfo = CONN.GetDataBaseLogon(); //Get Connection string from XML file
string[] Log = LogonInfo.Split(',');
SqlConnection Con = new SqlConnection(CONN.GetSqlConnectionString());
string Command = "USE MainDB; EXEC [dbo].[GetAllSalaf] ;";
DataSet DS = new DataSet();
SqlDataAdapter SAD = new SqlDataAdapter(Command, Con);
SAD.Fill(DS);
NewReports.Reports.AllSalaf S = new Reports.AllSalaf();
S.SetDataSource(DS);
// Log[0] =User Id ,Log[1] password Log[2] Server name
S.SetDatabaseLogon(Log[0], Log[1], Log[2], "MainDB");
crystalReportViewer1.ReportSource = S;
crystalReportViewer1.Refresh();
检查:
- Crystal 报告 运行 时间。
- 如果报告存在于您的项目部署电脑或服务器中?