Disconnected ado

G

Guest

I am designing / implementing a thick client application in C# which will draw in a large quantity of real time data from various external feeds (Tib and similar mechanisms)
cache data in an in memory database and display data in a variety of configurable controls on an MDI front end
A key objective of the design of the application is enabling the easy use in front end of off the shelf .Net Grid / Tree / other controls and an obvious way to do this is to suppor
data being provided to them using ADO .Net recordset classes. Due to the high volume of update going on into the system it is not desirable to bind these recordsets directly t
the in memory database and instead I am planning that for each ADO recordset (each can literally be thought of as a single table of data) required for front end dispay, there will
be two ADO Recordsets within the application, one will be directly bound to a UI Control refreshed periodically, the second will be maintained in real time by using an observer pattern on the real tim
database, the UI control bound record set will periodically refesh itself by copying changed rows from the real time recordset

Now For the question
For the recordset being updated by real time data I need to implement some locking as data can be written / created / deleted from mulitple threads and read by another thread.
So I required a writer lock on the data table as a whole for creates and deletes of rows, a read lock on the table and a write lock at row level for row updates and a reader lock on the table and at row level for row level writes. From looking through ADO .Net documentation and web sites the only way I can see of doing this is to contain the recordset (essentially the table), in a class with CreateRow, DeleteRow, GetRowForUpdate, and GetRowForRead methods, and contain each row in a class implenting a Read / Write methods, and lock using the ReaderWriterLock class supplied in .Net, the table containing class having a ReaderWriterLock object, and each row object having its own ReaderWriterLock object
This solution however is ineloquent, so is anyone aware of built in mechanism in ADO .Net to support what I am trying to do
 
C

Cor

Hi Marc,

Where do you have those articles, I think you confuse us.

We know the dataset (that is disconnected) from ADO.NET and the most of us
know the ADO recordset which is also usable in dotNet but is not dotNet
itself.

Or is it just something about writing and do you mean with recordset
dataset?

Cor
I am designing / implementing a thick client application in C# which will
draw in a large quantity of real time data from various external feeds (Tib
and similar mechanisms),
cache data in an in memory database and display data in a variety of
configurable controls on an MDI front end.
A key objective of the design of the application is enabling the easy use
in front end of off the shelf .Net Grid / Tree / other controls and an
obvious way to do this is to support
data being provided to them using ADO .Net recordset classes. Due to the
high volume of update going on into the system it is not desirable to bind
these recordsets directly to
the in memory database and instead I am planning that for each ADO
recordset (each can literally be thought of as a single table of data)
required for front end dispay, there will
be two ADO Recordsets within the application, one will be directly bound
to a UI Control refreshed periodically, the second will be maintained in
real time by using an observer pattern on the real time
database, the UI control bound record set will periodically refesh itself
by copying changed rows from the real time recordset.
Now For the question:
For the recordset being updated by real time data I need to implement some
locking as data can be written / created / deleted from mulitple threads and
read by another thread.
So I required a writer lock on the data table as a whole for creates and
deletes of rows, a read lock on the table and a write lock at row level for
row updates and a reader lock on the table and at row level for row level
writes. From looking through ADO .Net documentation and web sites the only
way I can see of doing this is to contain the recordset (essentially the
table), in a class with CreateRow, DeleteRow, GetRowForUpdate, and
GetRowForRead methods, and contain each row in a class implenting a Read /
Write methods, and lock using the ReaderWriterLock class supplied in .Net,
the table containing class having a ReaderWriterLock object, and each row
object having its own ReaderWriterLock object
This solution however is ineloquent, so is anyone aware of built in
mechanism in ADO .Net to support what I am trying to do.
 
M

Marc Clarke

Just the recordset data itself.
all I am after is this, is add a row to an object created from the
DataTable class thread safe, or do I have to synchronise it myself.
Similarly is updating data in a object created from the DataRow class
thread safe.
 
C

Cor

Hi Marc,

Try to forgot that recordset, it will give you only trouble in dotNet.

Go to the dataset

I have seen a lot who have tried to use the recordset in it in this
newsgroups.
Long threads why something was not working and at the end solutions which
where not complete.

But just my thought.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top