Re: Multiple concurrent isolated transactions on ADO Dataset



Well, i have a situation where it's fairly critical for changes made to the
data to be only visible to the person making the changes (until commit),
whilst the unchanged version should be visible to all other users... until
they make changes.

When the changes are committed, it's a first come, first served. I.e. it's
possible for person B to have their changes rejected as a result of person
A's changes.

I'm using a command pattern to implement the updates, inserts and deletes,
and stacking them up for the final commit...

Scenario:
Imagine a plane with 200 seats, and person A is allocated to seat 171, but
wants to be allocated to seat 89... the changes necessary re-allocate him
would be to deallocate from 171 and allocate to 89. Say the user was
interupted on the phone between deallocating from 171 and re-allocating to
89, and at that same time, another user allocated someone to 89 and another
to 171... Person A would now be without a seat on the plane.

Sorry for silly example :)

Mark.



"christian kuendig" <xxxx> wrote in message
news:uSFMEdvWFHA.1044@xxxxxxxxxxxxxxxxxxxxxxx
> You don't need to keep the connection open
>
> Why don't you use optimistic or pesimistic offline locking? (the optmisitc
> one is more or less included in the dataadapter)
>
> "Mark Roberts" <Mark_Roberts@xxxxxxxxxxxx> schrieb im Newsbeitrag
> news:u%23B7CWvWFHA.3760@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi
>>
>> No, it's not really possible to operate directly on the database
>> unfortunately - the changes that the user can make will be over a long
>> time (i.e. could be 1-2 hours, maybe more)
>>
>> I don't really want to attempt to keep a database transaction open for
>> that long :)
>>
>> Regards,
>>
>> Mark.
>>
>>
>>
>> "Rogas69" <rogas69@xxxxxxxxxxxxxxxx> wrote in message
>> news:OpQNrSvWFHA.1796@xxxxxxxxxxxxxxxxxxxxxxx
>>> What database do you use? You describe scenario that is easily handled
>>> by practically any database. You said that amount of data is huge -
>>> creating per-user copies will kill your server - think about memory
>>> allocation and copying. Is it not possible to operate directly on
>>> database?
>>>
>>> Peter
>>>
>>> "Mark Roberts" <Mark_Roberts@xxxxxxxxxxxx> wrote in message
>>> news:exDNqHvWFHA.612@xxxxxxxxxxxxxxxxxxxxxxx
>>>> Hi,
>>>>
>>>> I have been thinking about a problem for some time, and i'd like to
>>>> throw it open to the newsgroups in case someone has come across a
>>>> similar situation.
>>>>
>>>> I have a C# .Net 2.0 web application with a very large server-side
>>>> dataset (i.e. can only be 1 in memory).
>>>>
>>>> I have multiple users that wish to make changes to the dataset, and
>>>> each user's should be batched up and only visible to themselves until
>>>> they're committed, at which point they become part of the main dataset.
>>>>
>>>> I am thinking of have one dataset per user as well as the main dataset,
>>>> and recording changes into the user-based dataset.
>>>>
>>>> This is ok, but it adds a lot of complexity when querying the data,
>>>> since queries are essentially across two datasets.
>>>>
>>>> Ideally, i'd like to have multiple transaction layers on the main
>>>> dataset, one for each user that isolates their changes, but permits
>>>> dataset searching to work in the context of their transaction until
>>>> it's committed or rolled back.
>>>>
>>>>
>>>> Many thanks!
>>>> Mark.
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Multiple concurrent isolated transactions on ADO Dataset
    ... you take out the data you need from the database change ... while you're in a business transaction. ... Person A want's to change the seat: ... > would be to deallocate from 171 and allocate to 89. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: [PHP] A no brainer...
    ... that once you commit, the data is there no matter what. ... Unless session storage is used to save time in retrieving data, ... I think it would be kind of fun to run some actual tests. ... it makes no sense for a database to be faster than ...
    (php.general)
  • Re: using sqlite3 - execute vs. executemany; committing ...
    ... and also the proper commiting the transactions and closing the connection. ... If the database supports transactions then cursors automatically use ... I suggest that you use the standard cursor methods instead, ... always use .commit() and .close. ...
    (comp.lang.python)
  • Re: A lazy-committing database object with curry?
    ... > I'm writing a database helper class that represents records in a SQL ... > commit the changes all at once. ... transactionally, and the transaction fails, your in memory objects will ...
    (comp.lang.python)
  • Re: Adding new data to a cbo
    ... you'd need to enter a before you allocate ... > changea record because a related record is required in tblTask'. ... The Database statement should then compile. ... >>> to allocate each new task to an office staff member. ...
    (microsoft.public.access.gettingstarted)