Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

While running the windows application, when it gets database authentication it is showing connection failed with the following message.

"Format of the initialization string does not conform to specification starting at index 68"

Program for connection string:
public string Error_DB_Path = @"Data Source=USER-PC\LAMP; Initial Catalog=ERROR_RECORD;Integrated Security=true;";

public string Atom_DB_Path = @"Data Source=USER-PC\LAMP; Initial Catalog=;Integrated Security=true;";



public string Atom_DB_Name ="AtomGarments";
Posted

And which database engine do you use? It looks SQL Server...
Which of these is resulting in error? Only the second one is 68 characters long...
You should consult this extensive list to give a proper connection string: http://www.connectionstrings.com/sql-server/[^]
As I see, you are using a non-valid combination of parameters in your string.
You should not specify connection string from code. Use app.config/web.config instead: http://msdn.microsoft.com/en-us/library/ms254494%28v=vs.110%29.aspx[^]
 
Share this answer
 
Something's missing here: Initial Catalog=;
 
Share this answer
 

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