471,315 Members | 1,508 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 software developers and data experts.

How to make sure that data displayed on a form is the newest data?

Hi,

I am using VS2005 (C#) and SQL Server 2000.

How can I make sure that:

1. Client A queries info from database and displays it in a list view
or other controls on a form. If Client B changes some of this info
that is displayed by client A, clint A gets its info updated

2. If clint B tries to delete data currently displayed by client A,
the attempt should fail.

How can I make sure that database data displayed on the client's forms
is always newest data?

Any help will be appreciated.

_dino_
Feb 14 '06 #1
1 1230
Dino,

You will have to create some sort of update mechanism which will notify
other consumers of the same data if something has changed.

Also, it's not really realistic to hold onto records in the way that you
want to do. Rather, what you should do is have a timestamp of some sort on
the record. Then, when you want to change the record, check to see if the
timestamp is the same as the one you have. If it is, then perform your
change, otherwise, you have to fail the operation, since the record was
changed already.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dino Buljubasic" <di**@noplacelikehome.com> wrote in message
news:4o********************************@4ax.com...
Hi,

I am using VS2005 (C#) and SQL Server 2000.

How can I make sure that:

1. Client A queries info from database and displays it in a list view
or other controls on a form. If Client B changes some of this info
that is displayed by client A, clint A gets its info updated

2. If clint B tries to delete data currently displayed by client A,
the attempt should fail.

How can I make sure that database data displayed on the client's forms
is always newest data?

Any help will be appreciated.

_dino_

Feb 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by scottyman | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.