Click here to Skip to main content
16,012,061 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have build a project in asp.net. I have use MS SQL 2005\ EXPRESS edition.
Now I have install MS SQL Server 2005. if I change the server name from web.config file then its works nicely. But problem is crystal reports is not works properly. Report is not coming.

Can any one help me??
NB:

Config file----------------------
add key="servername" value=(local)\SQLEXPRESS
add key="databasename" value=TestDB
add key="username" value=sa
add key="password" value=123

---------------------
c#
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.




Thanks in advance
Rasadul Alam
Posted
Updated 21-Dec-10 19:40pm
v7
Comments
Wild-Programmer 21-Dec-10 5:13am    
Please provide the error message please.
Slacker007 21-Dec-10 5:23am    
This is a repost of the same fu**ing question he asked a couple minutes ago.
[no name] 22-Dec-10 1:36am    
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\local~1\LOCALS~1\Temp\Sale4MemberRpt {B732B111-F23C-4BE6-9523-6B1F667D31A9}.rpt:
Unable to connect: incorrect log on parameters.

1 solution

Hi Alam,

As the error says -
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
And since you have installed MS SQL Server 2005, you should manage the log in credentials in your config file for proper log in.
Try it out and post the problem if you still have problem

-Satya182
 
Share this answer
 
Comments
Liefie2000 2-May-14 10:50am    
So how do you add the login creditials to the config file for this to work?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900