how to get connection string from app.config in
  • how can i get my app.config connectionstring in
  • 1 Comment sorted by
  • Vote Up0Vote Down ithackerithacker
    117.50 Karma Accepted Answer
    hi coder use this code.

    app.config code

    <?xml version="1.0" encoding="utf-8" ?>
        <add name="dbAccountsConnectionString"
            connectionString="Data Source=.\sqlExpress;Initial Catalog=dbAccounts;Integrated Security=True"
            providerName="System.Data.SqlClient" />

    Form1.vb code

    Dim conStr As String = System.Configuration.ConfigurationManager.ConnectionStrings("dbAccountsConnectionString").ConnectionString

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook


Popular Posts of the Week

    Optimum Creative