Click here to Skip to main content
15,885,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Dear All Experts,

    <add name="conString">

      connectionString="Data Source=.\SQLEXPRESS;

                        database=Northwind;Integrated Security=true"/>



</add>


But anable to connect my databse. What i will do next

Thank u for ur valuable replay
Posted

If you connect to your database via Visual Studio (use the Server Explorer) and highlight the database, the Properties pane will hold the complete and working connection string which you can copy and paste into your web.config

If you are trying to connect to a database on your web host instead of the development machine you used for testing, then you need to look at your web hosts FAQ: the information will be there, or in an email sent to you when you signed up.
 
Share this answer
 
first add new item by right click on solution explorer then select Application Configuration File

and type this code
C#
<configuration>
    <configsections>
    </configsections>
    <connectionstrings>
        <add name="AccountingWindowApplication.Properties.Settings.WinPhoneAppConnectionString">
            connectionString="Data Source=COMPAQ-PC\SQLEXPRESS;Initial Catalog=WinPhoneApp;Integrated Security=True"
            providerName="System.Data.SqlClient" />
    </add></connectionstrings>
</configuration>
 
Share this answer
 
v2

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