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. run program from many PCs and database in one machine ?

run program from many PCs and database in one machine ?

Scheduled Pinned Locked Moved C#
databasequestionsql-serversysadminwindows-admin
6 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.
  • N Offline
    N Offline
    Nabawoka
    wrote on last edited by
    #1

    i want to run windows form program in more than one PC and the database to be in one PC and other PCs connect to it DB (sql server) >>>>>>>> how can i control *in setup of sql server *or on connection string *and what the requirements to make this is need to windows server or sql express ________________________________ tell me the steps and requirements please :)

    P D 2 Replies Last reply
    0
    • N Nabawoka

      i want to run windows form program in more than one PC and the database to be in one PC and other PCs connect to it DB (sql server) >>>>>>>> how can i control *in setup of sql server *or on connection string *and what the requirements to make this is need to windows server or sql express ________________________________ tell me the steps and requirements please :)

      P Offline
      P Offline
      Praveen Raghuvanshi
      wrote on last edited by
      #2

      You can create a WCF service that will interact with database on one machine and have various clients(Window/web) running on different machines. The client will interact through a URI of the service.

      Praveen Raghuvanshi Software Developer

      N 1 Reply Last reply
      0
      • P Praveen Raghuvanshi

        You can create a WCF service that will interact with database on one machine and have various clients(Window/web) running on different machines. The client will interact through a URI of the service.

        Praveen Raghuvanshi Software Developer

        N Offline
        N Offline
        Nabawoka
        wrote on last edited by
        #3

        the program will run on local network

        1 Reply Last reply
        0
        • N Nabawoka

          i want to run windows form program in more than one PC and the database to be in one PC and other PCs connect to it DB (sql server) >>>>>>>> how can i control *in setup of sql server *or on connection string *and what the requirements to make this is need to windows server or sql express ________________________________ tell me the steps and requirements please :)

          D Offline
          D Offline
          Dan Mos
          wrote on last edited by
          #4

          You can use SQL express as a server/service or as a local db. Local db that is just the current PC can acess it: "Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;" Use it as server "Data Source=myServer(or the PC ususally .SqlExpress);Initial Catalog=myDataBase(the actual DB);User Id=myUsername;Password=myPassword;" This is a sql authentification. Since it's on a local network if all the computers are on the same VLAN they should recognize it by the computer name. You can insert the IP instead of the pc/computer name but make sure to create a static IP first for the pc that acts as a server. Anyway you will need to carefully analyze the requirements. That is how many users will be accesing the DB at the same time, the complexity of the reports... If that(the number of simultaneous users) is more than 20, I sugeest SQL full not express. The express version has one big limitation. It can only use one CPU/core. So from a performance point of view bad for multi user access. As something to read about. I try to make something like the following (if possible) for all the apps for a enterprise. Analize the complexity of the app mainly the complexity of the reports cause a simple insert or update is not that big of a problem. And if the complexity of the reports is big(that depends on the server hardware too) I use the following config: client => appserver => sqlserver. Client = any desktop/laptop. AppServer = a server that acts as an intermediar between the client and the DB server. Or in other words a super PC that creates complex reports based on the raw data/info received from the DB server and not only. The DB server well that is the SQLServer. :)

          All the best, Dan

          modified on Tuesday, March 15, 2011 1:57 PM

          N 1 Reply Last reply
          0
          • D Dan Mos

            You can use SQL express as a server/service or as a local db. Local db that is just the current PC can acess it: "Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;" Use it as server "Data Source=myServer(or the PC ususally .SqlExpress);Initial Catalog=myDataBase(the actual DB);User Id=myUsername;Password=myPassword;" This is a sql authentification. Since it's on a local network if all the computers are on the same VLAN they should recognize it by the computer name. You can insert the IP instead of the pc/computer name but make sure to create a static IP first for the pc that acts as a server. Anyway you will need to carefully analyze the requirements. That is how many users will be accesing the DB at the same time, the complexity of the reports... If that(the number of simultaneous users) is more than 20, I sugeest SQL full not express. The express version has one big limitation. It can only use one CPU/core. So from a performance point of view bad for multi user access. As something to read about. I try to make something like the following (if possible) for all the apps for a enterprise. Analize the complexity of the app mainly the complexity of the reports cause a simple insert or update is not that big of a problem. And if the complexity of the reports is big(that depends on the server hardware too) I use the following config: client => appserver => sqlserver. Client = any desktop/laptop. AppServer = a server that acts as an intermediar between the client and the DB server. Or in other words a super PC that creates complex reports based on the raw data/info received from the DB server and not only. The DB server well that is the SQLServer. :)

            All the best, Dan

            modified on Tuesday, March 15, 2011 1:57 PM

            N Offline
            N Offline
            Nabawoka
            wrote on last edited by
            #5

            thnx alot MDL=>Moshu :D :D in sql server is need to enable tcp\ip or named pipes or something another in configuration or when i setup sql express need to enable thing in setup i try to use ip 127.0.0.1 and return exception is there any port needed in the connection string

            D 1 Reply Last reply
            0
            • N Nabawoka

              thnx alot MDL=>Moshu :D :D in sql server is need to enable tcp\ip or named pipes or something another in configuration or when i setup sql express need to enable thing in setup i try to use ip 127.0.0.1 and return exception is there any port needed in the connection string

              D Offline
              D Offline
              Dan Mos
              wrote on last edited by
              #6

              Hy, 0)Using 127.0.0.1 won't work when trying to access it form another computer. that is for localhost(s). 1) There is a setting when installing the SQL server. I haven't installed it in a while but I'm sure that there is 2) Normally no port needs to be changed. Do you have SQL Management Express? If yes try to connect to the db using SQL auth not windows auth.

              All the best, Dan

              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