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. How to create a lan based Window application backend sql?

How to create a lan based Window application backend sql?

Scheduled Pinned Locked Moved C#
csharpdatabasesysadmintutorialquestion
15 Posts 6 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.
  • A Alok Sharma ji

    hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #3

    1. Simple Client-server Interactions using C#[^]. 2. see 1. 3. more research needed.

    Use the best guess

    A 1 Reply Last reply
    0
    • A Alok Sharma ji

      hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards

      M Offline
      M Offline
      Manfred Rudolf Bihy
      wrote on last edited by
      #4

      If using SQL Server greater or equal to 2005 is an option you might want to consider employing SQL Server Notification Services[^]. There are also some sample applications on MSDN: SQL Server Notification Services Samples[^]. I hope this will help you. Regards,

      — Manfred

      "I had the right to remain silent, but I didn't have the ability!"

      Ron White, Comedian

      M 1 Reply Last reply
      0
      • A Alok Sharma ji

        hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #5

        Alok sharma ji wrote:

        3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that.

        That's usually not done; the normal way is to fetch the data and show the snapshot as it was on the moment of fetching. Updating "live" data moves the concurrency-problem from the database (where it was solved) into your app, where you need to solve it yourself. Simple example; you're editing a record, and the boss is editing the same one - you press "update" first. Now, how would you update the bosses record? Change the text in the textbox while he is editing/typing?

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        A 1 Reply Last reply
        0
        • M Manfred Rudolf Bihy

          If using SQL Server greater or equal to 2005 is an option you might want to consider employing SQL Server Notification Services[^]. There are also some sample applications on MSDN: SQL Server Notification Services Samples[^]. I hope this will help you. Regards,

          — Manfred

          "I had the right to remain silent, but I didn't have the ability!"

          Ron White, Comedian

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #6

          Manfred, have you ever used the notification service, I know we have never had to implement it and I am curious.

          Never underestimate the power of human stupidity RAH

          J 1 Reply Last reply
          0
          • A Alok Sharma ji

            hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #7

            Alok sharma ji wrote:

            how does client A gets notification of SQL update by client B ;when both are viewing/working on same table.

            That statement is a bit simple since it isn't a matter of working on the same table, since databases deal with that, but rather working on the same record (data) in the table. And that doesn't matter because it is very, very rare that there is an actual business case for that. For example when a order center takes a customer order only one employee is taking the order. The customer is making the same order on two different phones lines.

            1 Reply Last reply
            0
            • M Mycroft Holmes

              Manfred, have you ever used the notification service, I know we have never had to implement it and I am curious.

              Never underestimate the power of human stupidity RAH

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #8

              Mycroft Holmes wrote:

              I know we have never had to implement it and I am curious.

              I have been exclusively doing backend database driven stuff often in high demand environments and the only 'need' I have ever seen for this is when some developer claims that it "could" happen. Analyzing actual business cases and actual usage has never demonstrated a need.

              M 1 Reply Last reply
              0
              • J jschell

                Mycroft Holmes wrote:

                I know we have never had to implement it and I am curious.

                I have been exclusively doing backend database driven stuff often in high demand environments and the only 'need' I have ever seen for this is when some developer claims that it "could" happen. Analyzing actual business cases and actual usage has never demonstrated a need.

                M Offline
                M Offline
                Mycroft Holmes
                wrote on last edited by
                #9

                That has been my experience except I'm the developer so it has never happened, every now and then I have to slap a BA who suggests it to the users.

                Never underestimate the power of human stupidity RAH

                A 1 Reply Last reply
                0
                • L Lost User

                  Alok sharma ji wrote:

                  3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that.

                  That's usually not done; the normal way is to fetch the data and show the snapshot as it was on the moment of fetching. Updating "live" data moves the concurrency-problem from the database (where it was solved) into your app, where you need to solve it yourself. Simple example; you're editing a record, and the boss is editing the same one - you press "update" first. Now, how would you update the bosses record? Change the text in the textbox while he is editing/typing?

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                  A Offline
                  A Offline
                  Alok Sharma ji
                  wrote on last edited by
                  #10

                  i think i will just put an edit lock for client 2 if client 1 is working on same table.

                  1 Reply Last reply
                  0
                  • L Lost User

                    1. Simple Client-server Interactions using C#[^]. 2. see 1. 3. more research needed.

                    Use the best guess

                    A Offline
                    A Offline
                    Alok Sharma ji
                    wrote on last edited by
                    #11

                    are you sure big DB data can travel through sockets ??

                    L 1 Reply Last reply
                    0
                    • A Alok Sharma ji

                      are you sure big DB data can travel through sockets ??

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #12

                      Any type of data can travel through sockets; how do you think the internet, database systems etc work?

                      Use the best guess

                      A 1 Reply Last reply
                      0
                      • M Mycroft Holmes

                        That has been my experience except I'm the developer so it has never happened, every now and then I have to slap a BA who suggests it to the users.

                        Never underestimate the power of human stupidity RAH

                        A Offline
                        A Offline
                        Alok Sharma ji
                        wrote on last edited by
                        #13

                        Indeed I always heard the rumors of SQL notification to subjugate LAN as RTS but caching one is like "fools gold".

                        1 Reply Last reply
                        0
                        • L Lost User

                          Any type of data can travel through sockets; how do you think the internet, database systems etc work?

                          Use the best guess

                          A Offline
                          A Offline
                          Alok Sharma ji
                          wrote on last edited by
                          #14

                          can you re-create the given sample for a simple test table in sql, yesterday one of my friends told me to just share connection string path to server as one approach to do the thing ; But will it be on the same performance with socks?

                          L 1 Reply Last reply
                          0
                          • A Alok Sharma ji

                            can you re-create the given sample for a simple test table in sql, yesterday one of my friends told me to just share connection string path to server as one approach to do the thing ; But will it be on the same performance with socks?

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #15

                            Alok sharma ji wrote:

                            will it be on the same performance with socks?

                            There's only one way to find out.

                            Use the best guess

                            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