Unable to connect: incorrect log on parameters Crystal report

Posted by Brave ali Khatri on Stack Overflow See other posts from Stack Overflow or by Brave ali Khatri
Published on 2010-12-31T07:25:42Z Indexed on 2010/12/31 8:54 UTC
Read the original article Hit count: 512

I am using windows 7 ,SQL Server 2000 and VS 2008 / Crystal Report XI.

i am getting Below Error when click on GetReport Button.

Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user 'sa'. SQL State: 42000 Native Error: Error in File C:\Users\bahadur\AppData\Local\Temp\Total_Sales_Comparision {C4649F80-D1F7-4AED-A4B1-0B8EF83996C6}.rpt: Unable to connect: incorrect log on parameters. Blockquote

MY C# Code is below

ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = "BRAVEALI-PC";
crConnectionInfo.DatabaseName = "SCM_TEST";
crConnectionInfo.UserID = "sa";
crConnectionInfo.Password = "myDB Password";

ReportDocument report = new ReportDocument();
report.Load(@"D:\Project's\SCM Reports\Total_Sales_Comparision.rpt");
report.SetParameterValue("@invcm_date_from", Convert.ToDateTime (TextBox4.Text));
report.SetParameterValue("@invcm_date_to", Convert .ToDateTime(TextBox5.Text));
CrystalReportViewer1.ReportSource = report;


Brave Ali

© Stack Overflow or respective owner

Related posts about sql

Related posts about visual-studio