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. C#
  4. constructing an sql connection with out sql support.

constructing an sql connection with out sql support.

Scheduled Pinned Locked Moved C#
databasesql-serversysadminsecurityworkspace
4 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.
  • K Offline
    K Offline
    Keshav V Kamat 0
    wrote on last edited by
    #1

    hello people, I have an sql connection like the following. it works perfectly fine. I am using sql server'05.

    SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");

    However, i want to have a connection so that my application runs on any machine, that does not have the sql server. thanks

    Keshav Kamat :) India

    C 1 Reply Last reply
    0
    • K Keshav V Kamat 0

      hello people, I have an sql connection like the following. it works perfectly fine. I am using sql server'05.

      SqlConnection conn = new SqlConnection("Data Source=" + Environment.MachineName + "\\WINCC;Integrated Security=SSPI;Initial Catalog=Logger; Packet Size = 32766;");

      However, i want to have a connection so that my application runs on any machine, that does not have the sql server. thanks

      Keshav Kamat :) India

      C Offline
      C Offline
      Corinna John
      wrote on last edited by
      #2

      Keshav V. Kamat wrote:

      i want to have a connection so that my application runs on any machine

      Activate TCP/IP and the "Server Browser Service" in the SQLServer's configuration dialog. Locally, the SQLServer uses Named Pipes fpor comminucation with clients. To talk to remote clients, it needs CP/IP. To find the instance "WINCC" by name, the clients need the browsing service.

      ____________________________________ There is no proof for this sentence.

      K 1 Reply Last reply
      0
      • C Corinna John

        Keshav V. Kamat wrote:

        i want to have a connection so that my application runs on any machine

        Activate TCP/IP and the "Server Browser Service" in the SQLServer's configuration dialog. Locally, the SQLServer uses Named Pipes fpor comminucation with clients. To talk to remote clients, it needs CP/IP. To find the instance "WINCC" by name, the clients need the browsing service.

        ____________________________________ There is no proof for this sentence.

        K Offline
        K Offline
        Keshav V Kamat 0
        wrote on last edited by
        #3

        Thanks. But still, I want the connection to work when there is no SQL installed on a machine. instance "WINCC" is fine. i could let an open file dialog or a simple text box do the job. But I feel creating a database without any data source would be impossible. thanks anyways.

        Keshav Kamat :) India

        C 1 Reply Last reply
        0
        • K Keshav V Kamat 0

          Thanks. But still, I want the connection to work when there is no SQL installed on a machine. instance "WINCC" is fine. i could let an open file dialog or a simple text box do the job. But I feel creating a database without any data source would be impossible. thanks anyways.

          Keshav Kamat :) India

          C Offline
          C Offline
          Corinna John
          wrote on last edited by
          #4

          SQLServer can run on any remote machine. The client application finds the server by servername\instancename in the connection string. Activate TCP/IP and Browser Service on the remote server and your clients will run fine.

          ____________________________________ There is no proof for this sentence.

          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