Danish Habib

Danish Habib

  • NA
  • 694
  • 245.9k

I have a project in which the connection string is defined a

Oct 13 2015 2:40 AM
I have a desktop project in which i have sql server and visual studio 2010 
in my app.config i have the connection string defined as
<connectionStrings>
<add name="DMS_2008_Data.Properties.Settings.Default.DataConnection"
connectionString="Data Source=ASPKCO-DANISH\SQLEXPRESS1;Initial Catalog=DMS2008;Integrated Security=True;Connect Timeout=300;MultipleActiveResultSets=True"
providerName="System.Data.SqlClient" />
<!--<add name="DBPortal" connectionString="Data Source=ASPKCO-DANISH\SQLEXPRESS1;Initial Catalog=DMS2008;Integrated Security=True;Connect Timeout=30"
providerName="System.Data.SqlClient"/>-->
<add name="DMS2008_DataLayer.Properties.Settings.DataConnection"
connectionString="Data Source=ASPKCO-DANISH\SQLEXPRESS1;Initial Catalog=DMS2008;Integrated Security=True;Connect Timeout=30"
providerName="System.Data.SqlClient" />
</connectionStrings>
 
and in code i am accessing it with below line
 
_objdocumentheader = null;
con = new SqlConnection(DMS_2008_Data.Properties.Settings.Default.DataConnection.ToString());
con.Open();
but it gives an error saying a network or instance specific error
 
please assists  
 
 
 

Answers (1)