Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. connecting to sql server using application configuration file

connecting to sql server using application configuration file

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadminhelptutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    h ma
    wrote on last edited by
    #1

    i m working on widows application..for connectivity to sql i want to give datasource in app config file..and in every page i wan to call that string but i dont understand how to do that can anyone help me??

    $h@ma!|@

    V 1 Reply Last reply
    0
    • H h ma

      i m working on widows application..for connectivity to sql i want to give datasource in app config file..and in every page i wan to call that string but i dont understand how to do that can anyone help me??

      $h@ma!|@

      V Offline
      V Offline
      Vipin d
      wrote on last edited by
      #2

      hi, add a appconfig file to your application... and add a key to that appconfig file.. eg:< > and in cs/vb file string keyval = ConfigurationSettings.AppSettings["DATASOURCE"].ToString();

      All I ever wanted is what others have....
      CrazySanker

      H 1 Reply Last reply
      0
      • V Vipin d

        hi, add a appconfig file to your application... and add a key to that appconfig file.. eg:< > and in cs/vb file string keyval = ConfigurationSettings.AppSettings["DATASOURCE"].ToString();

        All I ever wanted is what others have....
        CrazySanker

        H Offline
        H Offline
        h ma
        wrote on last edited by
        #3

        thx but it is giving error i.e; The name 'ConfigurationSettings' does not exist in the current context

        $h@ma!|@

        H 1 Reply Last reply
        0
        • H h ma

          thx but it is giving error i.e; The name 'ConfigurationSettings' does not exist in the current context

          $h@ma!|@

          H Offline
          H Offline
          h ma
          wrote on last edited by
          #4

          and i have written in app file rescue15 is it ok???

          $h@ma!|@

          V 1 Reply Last reply
          0
          • H h ma

            and i have written in app file rescue15 is it ok???

            $h@ma!|@

            V Offline
            V Offline
            Vipin d
            wrote on last edited by
            #5

            use this name space using System.Configuration; in ur .cs file

            All I ever wanted is what others have....
            CrazySanker

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups