[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

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

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.

Thanks,
Jerry
0
JDL129
Asked:
JDL129
  • 3
  • 2
2 Solutions
 
ktaczalaCommented:
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.
0
 
p_davisCommented:
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.
0
 
p_davisCommented:
and then, maybe give a message/error that the row isn't editable
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
JDL129Author Commented:
Great ideas!!  I wasn't thinking along those lines.
0
 
p_davisCommented:
well, thank you. glad to have helped.
0
 
JDL129Author Commented:
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!!!

Jerry
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now