Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a database file employee.mdf and sql server express only.

What are the credentials i have to use for ConnectionInfo class and i do not have user id and password

My connection string is:
CSS
ConnectionString: "Data Source= .\\SQLExpress; AttachDbFilename=E:\\employee_Data.mdf; Database=employee;  Trusted_Connection=Yes;connectionInfo.IntegratedSecurity = true;";

And for logon to the database the below code is in the report class:

CSS
connectionInfo.ServerName = @".\SQLEXPRESS";
connectionInfo.DatabaseName =  @"E:\employee_Data.mdf";


But when run the report it is asking the user id and password!
I've deployed my project(Sql express and all prerequirements) with a setup and i can't create a user in sqlexpress in the deploym time.

Please help me.
Posted

1 solution

Try doing this in your code while creating report:
C#
myCrystalReprot.SetDatabaseLogon("myUsername", "myPassword");


Further, see if these help:
C# Crystal Reports Dynamic Logon parameters [^]
Crystal Reports asks for Username and Password while loading[^]
Topic: asking every time username password[^]
 
Share this answer
 
Comments
B.Farivar 8-Jul-12 11:44am    
There is no username and password!
Sandeep Mewara 9-Jul-12 14:07pm    
Then pass empty strings to log on. Just try.

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