Important drawback in .NET DataSet.

  • Thread starter Thread starter Lester Moreno
  • Start date Start date
L

Lester Moreno

Hello all,


Up to now C# have been an great experience but I found myself in a end of
the road problem.

Let say that you have two windows program running on a local network area.

User1 and user2 have the same information in the dataset and user1 makes a
change, unless user2 refill all his tables in his dataset he can't see the
new changes made by User1 and it can easily overwrite them.

Please, if you have some ideas how to make a Sync process please let me
know.


Thanks!
 
I think that ADO.NET was design as a web server engine, I have look all
over of a way to Syncronise two users loaded dataset and all I can thing is
do a fill each time the user try to make a search!

How would you do it?

Thanks!!
 
Yes,

I think that what I need to do, but I can't find any docs about how to store
the state in the database!


Do you have some link's that I can read about this,

Thank you a lot!
 
One way to lock records is to create a column in your
table (call it Status or something). When the user
accesses a record, you set the Status to "in use" (you
define the value) and commit the record back to the
database. When the user is either done or cancels
editing, then the Status is set back to an "available"
status. Timing needs to be managed carefully because
commits (or Update) to the database make all changes
permenent. And the only way another user is going to see
this is to refresh the dataset.

----Original Message-----
 
Hello,


So what you are saying is not to use Dataset and star using DataReader to
access the data directly?

Thanks,
Lester
 
Thank you sandman,

It looks like that ADO.NET is not design to do small application using
record looking and accessing the data without having to cash them. For
example VFoxpro use dataviews that are retrieved from SQL each time you need
to access a table, and them you update back and all the views from that
point own, have the new changes!

That's what I need to do with c#.

Thanks!

Lester
 
Back
Top