A
AAJ
Hi all
FIRST THE BORING BITS.......
I normally use a Database layer, a Business layer and a GUI layer.
The GUI uses an Object data source to bind to the Business layer which in
turn binds to the database layer. Every thing is great. I can read data,
change data in the grid, update the database, and when the GUI reloads, all
the changes are all present and correct. i.e. the data seems to be persisted
in the physical databse and re read when the pages are refreshed.
In my current case I want to do some thing similar but am unsure of the
concepts I need to follow.
This time, I have manually created a datatable in a dataset (strongly typed
using XML) which forms my database layer (BUT this does not connect to a
physical database, its just a manually programatically creates and populates
the dataset with data)
My business layer connects to this database layer.
As usual, my GUI connects to the business layer and the data is presented in
a gridview.
All this works fine. Data is displayed, I can click on the edit of the
gridview, this allows me to change the data, write the data to my business
layer, which then updates the dataset held in the databse layer. This all
works.
however......
After the update has been performed the GUI refreshes, and my business and
database layers are destroyed and and then re created as the Object Dataset
re initialises itsself and its data.
AND EVENTUALLY THE QUESTION........
What I can't understand is - How do I persist my dataset without writing it
to a database. I just want to keep a dataset live to which my GUI's can
write to and treat as though they were a true database datatable, throughout
the lifetime of a client being connected.
hope someone can help,
many thanks
Andy
P.s. I know I can use a viewstate etc on my GUI, but I want the database
layer itsself to manage its own perstistance, so please help, there must be
some pattern or tutorial out there.
FIRST THE BORING BITS.......
I normally use a Database layer, a Business layer and a GUI layer.
The GUI uses an Object data source to bind to the Business layer which in
turn binds to the database layer. Every thing is great. I can read data,
change data in the grid, update the database, and when the GUI reloads, all
the changes are all present and correct. i.e. the data seems to be persisted
in the physical databse and re read when the pages are refreshed.
In my current case I want to do some thing similar but am unsure of the
concepts I need to follow.
This time, I have manually created a datatable in a dataset (strongly typed
using XML) which forms my database layer (BUT this does not connect to a
physical database, its just a manually programatically creates and populates
the dataset with data)
My business layer connects to this database layer.
As usual, my GUI connects to the business layer and the data is presented in
a gridview.
All this works fine. Data is displayed, I can click on the edit of the
gridview, this allows me to change the data, write the data to my business
layer, which then updates the dataset held in the databse layer. This all
works.
however......
After the update has been performed the GUI refreshes, and my business and
database layers are destroyed and and then re created as the Object Dataset
re initialises itsself and its data.
AND EVENTUALLY THE QUESTION........
What I can't understand is - How do I persist my dataset without writing it
to a database. I just want to keep a dataset live to which my GUI's can
write to and treat as though they were a true database datatable, throughout
the lifetime of a client being connected.
hope someone can help,
many thanks
Andy
P.s. I know I can use a viewstate etc on my GUI, but I want the database
layer itsself to manage its own perstistance, so please help, there must be
some pattern or tutorial out there.