Problems with running C# program on seveal computers on a network.

Posted on 2013-12-20
Last Modified: 2013-12-21
Hey guys!!!

I have an app that is running on several computers.  In this app I have a timer that retrieves information from the web and saves it to a table which updates the dgv.  My question is when one employee selects a row in the grid how to locked it on all the other computers as well as all the other rows with the same ID.

Question by:JDL129
  • 3
  • 2
LVL 12

Accepted Solution

ktaczala earned 250 total points
ID: 39733764
Don't think you can lock it but, you could use stored procedure to check if record has been updated by someone else, then refresh record.
LVL 22

Assisted Solution

p_davis earned 250 total points
ID: 39733807
you would have to modify for your specific scenario/setup but you could get index/primary key for the row and set that as a static variable/object to enable/disable row editing as needed.
LVL 22

Expert Comment

ID: 39733808
and then, maybe give a message/error that the row isn't editable
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Closing Comment

ID: 39733816
Great ideas!!  I wasn't thinking along those lines.
LVL 22

Expert Comment

ID: 39733820
well, thank you. glad to have helped.

Author Comment

ID: 39733873
I was thinking about adding a field to the table and populating it with the computer name when it is selected.  When the timer refreshes the dgv it would only select the rows with the current computer name or blanks in the new field.  That way none of the other computers would have access to the rows.

Thanks again, you guys are wonderful!!!


Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question