Dear,
I am in great tense regarding connectivity problem.here below I try to explain my problem.
#####################################
<configuration>
<configsections>
</configsections>
<connectionstrings>
<add name="ConStr" connectionstring="Data Source=(local)\SQLEXPRESS2;Initial Catalog=Accounts;User ID=sa;Password=sa" providername="System.Data.SqlClient" />
</connectionstrings>
<appsettings>
<add key="ConStr" value="Data Source=(local)\SQLEXPRESS2;Integrated Security=SSPI;Initial Catalog=Accounts;User ID=sa;Password=sa" />
<add key="SecurityKey" value="My_Encript_Key" />
<!--
<add key="Conn" value="Data Source=(local)\SQLEXPRESS2;Initial Catalog=master;Integrated Security=SSPI;User ID=sa;Password=sa" />
<add key="DateStampBackupFiles" value="True" />
<add key="servername" value="(local)\sqlexpress2" />
<add key="databasename" value="Accounts" />
<add key="username" value="sa" />
<add key="password" value="sa" />
</appsettings>
<databaseinformation name="data" username="sa" password="sa" servername="(local)\sqlexpress2" pvdr="SQLOLEB.1" databasename="Accounts" />
</configuration>
here two problems arise I have accessed connection like:
System.Configuration.ConfigurationSettings.AppSettings["ConStr"].ToString();
give error not found ConStr but when i remove
<databaseinformation name="data" username="sa" password="sa" servername="(local)\sqlexpress2" pvdr="SQLOLEB.1" databasename="Accounts"/>
this works fine
I need both work concurrently because I am using
<add key="ConStr" value="Data Source=(local)\SQLEXPRESS2;Integrated Security=SSPI;Initial Catalog=Accounts;User ID=sa;Password=sa" />
<add key="SecurityKey" value="My_Encript_Key"/>
<add key="Conn" value="Data Source=(local)\SQLEXPRESS2;Initial Catalog=master;Integrated Security=SSPI;User ID=sa;Password=sa"/>
for data insert,delete other database works,but
<pre><databaseinformation name="data" username="sa" password="sa" servername="(local)\sqlexpress2" pvdr="SQLOLEB.1" databasename="Accounts"/></pre>
this one for crystal report
I am in deep fix,please some one help me to get out this problem
I will be really grateful
Thanks
Mahmud(SN. Software Engineer)