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! 6 4621
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!!
"codewriter" <co**************@yahoo.com> wrote in message
news:Vt*******************@news20.bellglobal.com.. . Hi Lester,
ADO.NET uses optimistic locking. DataSet is the same as disconnected recodset. And I think it is properly designed this way. You do not really want your database being locked when a user opens a dataset. So, I do not think it is a drawback at all, it's by design. If you want to implement locking you should use different approach.
"Lester Moreno" <le**********@covad.com> wrote in message news:bg**********@sun-news.laserlink.net... 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!
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!
"codewriter" <co**************@yahoo.com> wrote in message
news:W5*******************@news20.bellglobal.com.. . You are thinking in the Client-Server mode. This means that you are
caching information on the client, i.e. storing the state on the client instead of server. Better way would be to think in a N-tiered application way. In the latter case, it is required to store the state in the database, at least this is what MS recommends. In this case, you have only one source of information, and you do not need to synchronize anything. And you are
right, every time user makes a search you should go to the database and get the data. On top of that, if you want to prevent other users from overwriting, you should implement locking in the database. One way of doing it would be to use a flag field that would indicate that this particular record is being edited by somebody, and whoever tries to overwtite it should get a message that the record is locked. This poses some drawbacks, of course. But it
will work.
"Lester Moreno" <le**********@covad.com> wrote in message news:bg**********@sun-news.laserlink.net... 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!!
"codewriter" <co**************@yahoo.com> wrote in message news:Vt*******************@news20.bellglobal.com.. . Hi Lester,
ADO.NET uses optimistic locking. DataSet is the same as disconnected recodset. And I think it is properly designed this way. You do not really want your database being locked when a user opens a dataset. So, I do not think it is a drawback at all, it's by design. If you want to implement locking you should use different approach.
"Lester Moreno" <le**********@covad.com> wrote in message news:bg**********@sun-news.laserlink.net... > 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! > >
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----- Yes,
I think that what I need to do, but I can't find any docs
about how to storethe state in the database!
Do you have some link's that I can read about this,
Thank you a lot!
"codewriter" <co**************@yahoo.com> wrote in message news:W5*******************@news20.bellglobal.com. .. You are thinking in the Client-Server mode. This means
that you arecaching information on the client, i.e. storing the state on
the client instead of server. Better way would be to think in a N-tiered
application way. In the latter case, it is required to store the state in the
database, at least this is what MS recommends. In this case, you have only
one source of information, and you do not need to synchronize
anything. And you areright, every time user makes a search you should go to the
database and get the data. On top of that, if you want to prevent other users from
overwriting, you should implement locking in the database. One way of
doing it would be to use a flag field that would indicate that this
particular record is being edited by somebody, and whoever tries to overwtite it
should get a message that the record is locked. This poses some drawbacks,
of course. But itwill work.
"Lester Moreno" <le**********@covad.com> wrote in
message news:bg**********@sun-news.laserlink.net... > 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!! > > "codewriter" <co**************@yahoo.com> wrote in
message > news:Vt*******************@news20.bellglobal.com.. . > > Hi Lester, > > > > ADO.NET uses optimistic locking. DataSet is the
same as disconnected > > recodset. And I think it is properly designed this
way. You do not really > > want your database being locked when a user opens a
dataset. So, I do not > > think it is a drawback at all, it's by design. > > If you want to implement locking you should use
different approach. > > > > "Lester Moreno" <le**********@covad.com> wrote in
message > > news:bg**********@sun-news.laserlink.net... > > > Hello all, > > > > > > > > > Up to now C# have been an great experience but I
found myself in aend > 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'tsee > 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! > > > > > > > > > > > >
.
Lester,
I believe you can use SQL Server 2000 Notification Services to achieve what
you want. http://msdn.microsoft.com/library/de...arted_4mn9.asp
Hope this helps
Jay
"Lester Moreno" <le**********@covad.com> wrote in message
news:bg**********@sun-news.laserlink.net... 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!
Hello,
So what you are saying is not to use Dataset and star using DataReader to
access the data directly?
Thanks,
Lester
"codewriter" <co**************@yahoo.com> wrote in message
news:ZO*******************@news20.bellglobal.com.. . Well, I don't know about the links, but in order to save the state in the database you will have to create tables and store your data in them. If
you give me a bit more info about your particular project, I will be able to write some code for you if you like.
Actually, this article deals with general design recommendations for .NET: http://msdn.microsoft.com/vstudio/us...apparchch2.asp Regards
"Lester Moreno" <le**********@covad.com> wrote in message news:bg**********@sun-news.laserlink.net... 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!
"codewriter" <co**************@yahoo.com> wrote in message news:W5*******************@news20.bellglobal.com.. . You are thinking in the Client-Server mode. This means that you are caching information on the client, i.e. storing the state on the client
instead of server. Better way would be to think in a N-tiered application way. In the latter case, it is required to store the state in the database, at
least this is what MS recommends. In this case, you have only one source of information, and you do not need to synchronize anything. And you are
right, every time user makes a search you should go to the database and get
the data. On top of that, if you want to prevent other users from overwriting,
you should implement locking in the database. One way of doing it would be to use a flag field that would indicate that this particular record is being edited by somebody, and whoever tries to overwtite it should get a message that the record is locked. This poses some drawbacks, of course. But
it will work.
"Lester Moreno" <le**********@covad.com> wrote in message news:bg**********@sun-news.laserlink.net... > 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!! > > "codewriter" <co**************@yahoo.com> wrote in message > news:Vt*******************@news20.bellglobal.com.. . > > Hi Lester, > > > > ADO.NET uses optimistic locking. DataSet is the same as
disconnected > > recodset. And I think it is properly designed this way. You do not really > > want your database being locked when a user opens a dataset. So, I do not > > think it is a drawback at all, it's by design. > > If you want to implement locking you should use different
approach. > > > > "Lester Moreno" <le**********@covad.com> wrote in message > > news:bg**********@sun-news.laserlink.net... > > > 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! > > > > > > > > > > > >
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
"sandman" <sa*********@yahoo.com> wrote in message
news:07****************************@phx.gbl... 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-----Yes,
I think that what I need to do, but I can't find any docs about how to storethe state in the database!
Do you have some link's that I can read about this,
Thank you a lot!
"codewriter" <co**************@yahoo.com> wrote in message news:W5*******************@news20.bellglobal.com. .. You are thinking in the Client-Server mode. This means that you arecaching information on the client, i.e. storing the state on the client instead of server. Better way would be to think in a N-tiered application way. In the latter case, it is required to store the state in the database, at least this is what MS recommends. In this case, you have only one source of information, and you do not need to synchronize anything. And you areright, every time user makes a search you should go to the database and get the data. On top of that, if you want to prevent other users from overwriting, you should implement locking in the database. One way of doing it would be to use a flag field that would indicate that this particular record is being edited by somebody, and whoever tries to overwtite it should get a message that the record is locked. This poses some drawbacks, of course. But itwill work.
"Lester Moreno" <le**********@covad.com> wrote in message news:bg**********@sun-news.laserlink.net... > 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!! > > "codewriter" <co**************@yahoo.com> wrote in message > news:Vt*******************@news20.bellglobal.com.. . > > Hi Lester, > > > > ADO.NET uses optimistic locking. DataSet is the same as disconnected > > recodset. And I think it is properly designed this way. You do not really > > want your database being locked when a user opens a dataset. So, I do not > > think it is a drawback at all, it's by design. > > If you want to implement locking you should use different approach. > > > > "Lester Moreno" <le**********@covad.com> wrote in message > > news:bg**********@sun-news.laserlink.net... > > > Hello all, > > > > > > > > > Up to now C# have been an great experience but I found myself in aend > 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'tsee > 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! > > > > > > > > > > > >
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Randell D. |
last post by:
Folks,
I have a table that has five columns in it - It collates references to
records in five other tables. I understand that an index/key can help
improve performance when searching - however...
|
by: Xiangliang Meng |
last post by:
Hi, all.
What are the benefit and the drawback of defining a class embedded inside
another class?
For example:
class List
{
public:
|
by: Bill C. |
last post by:
Hi,
I've got a simple console app that just reads an XML file into a DataSet
then prints out a description of each table in the DataSet, including
column names and row values for each column. ...
|
by: Jeronimo Bertran |
last post by:
Hi,
I have an xml file that encapsulates a dataset definition within a set
of tags (<dataset>)... here is an example
<?xml version="1.0" encoding="utf-16"?>
<dataset>
<MyTable>...
|
by: Mike |
last post by:
I need to expand the DataSet class by inheriting from it and adding
functions that work on the data in the tables. However, since I can't
upcast how can I get my base DataSet object assigned an...
| |
by: JJ |
last post by:
Hi,
I need to pass a dataset to another win form along with a SqldataAdapter.
I don't want to recreate the SqlDataAdapter again either. So to pass to
another Win form in my windows form app, do...
|
by: Dario de Judicibus |
last post by:
I am experimenting with CSS since 2001. As I moved from frame based sites to
CSS sites, I realized that the major drawback of CSS is that you cannot
anymore have your header, manu, footer and...
|
by: Dave |
last post by:
We've created a robust client server application over the past 3 years
on the .NET framework version 1.1 using c#. We layed all of our
marbles in creating strongly typed datasets and for the most...
|
by: shamirza |
last post by:
· What is view state and use of it?
The current property settings of an ASP.NET page and those of any
ASP.NET server controls contained within the page. ASP.NET can detect
when a form is requested...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |