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. General Programming
  3. .NET (Core and Framework)
  4. connection string

connection string

Scheduled Pinned Locked Moved .NET (Core and Framework)
question
5 Posts 3 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.
  • K Offline
    K Offline
    kulandaivel_mca2007
    wrote on last edited by
    #1

    this is my connection string... SqlConnection objCon = new SqlConnection("Data Source=VEESERV4;Initial Catalog=DemoInven;User ID=sa;Password=sa"); i give data source = veeserv4... instead of this i have to give one word file their... and the corresponding text in that word file is taken as data source name... how can i do this...

    A S 2 Replies Last reply
    0
    • K kulandaivel_mca2007

      this is my connection string... SqlConnection objCon = new SqlConnection("Data Source=VEESERV4;Initial Catalog=DemoInven;User ID=sa;Password=sa"); i give data source = veeserv4... instead of this i have to give one word file their... and the corresponding text in that word file is taken as data source name... how can i do this...

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      kulandaivel_mca2007 wrote:

      instead of this i have to give one word file their... and the corresponding text in that word file is taken as data source name...

      Why ??:confused:

      cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

      K 1 Reply Last reply
      0
      • K kulandaivel_mca2007

        this is my connection string... SqlConnection objCon = new SqlConnection("Data Source=VEESERV4;Initial Catalog=DemoInven;User ID=sa;Password=sa"); i give data source = veeserv4... instead of this i have to give one word file their... and the corresponding text in that word file is taken as data source name... how can i do this...

        S Offline
        S Offline
        saberbladez
        wrote on last edited by
        #3

        Try this SqlConnection objCon = New SqlConnection(ConfigurationManager.ConnectionStrings["VEESERV4"].ConnectionString)

        1 Reply Last reply
        0
        • A Abhijit Jana

          kulandaivel_mca2007 wrote:

          instead of this i have to give one word file their... and the corresponding text in that word file is taken as data source name...

          Why ??:confused:

          cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

          K Offline
          K Offline
          kulandaivel_mca2007
          wrote on last edited by
          #4

          projects are submitted in exe file format... so he(client) not able to change datasource name... if the datasource name taken from word file... he can change easily..

          A 1 Reply Last reply
          0
          • K kulandaivel_mca2007

            projects are submitted in exe file format... so he(client) not able to change datasource name... if the datasource name taken from word file... he can change easily..

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            kulandaivel_mca2007 wrote:

            projects are submitted in exe file format...

            You have to use configure file app.config for Windows applications[^] You can also Encrypt it Encrypting the app.config File for Windows Forms Applications[^]

            cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

            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