add key="servername" value=(local)\SQLEXPRESS add key="databasename" value=TestDB add key="username" value=sa add key="password" value=123
ReportDocument cryRpt = new ReportDocument(); cryRpt.Load(ReportName); string servername = ConfigurationManager.AppSettings["servername"].ToString(); string databasename = ConfigurationManager.AppSettings["databasename"].ToString(); string username = ConfigurationManager.AppSettings["username"].ToString(); string password = ConfigurationManager.AppSettings["password"].ToString(); CryRpt.SetDatabaseLogon(username, password, servername, databasename);
<pre lang="msil">Logon failed. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. SQL State: 08001 Native Error: Error in File C:\DOCUME~1\RABIUL~1\LOCALS~1\Temp\Sale4MemberRpt {B732B111-F23C-4BE6-9523-6B1F667D31A9}.rpt: Unable to connect: incorrect log on parameters.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)