Hi,
We have a ms access database that we will be using to develop a website
which would have fairly low usage levels.
We have some experience with windows apps but not so much with asp.net
projects. We have used ADO datasets previously for a windows application
that we developed where the entire db was loaded into the dataset at the
beginning of the application and the user made changes to the dataset
which was then saved back to the db when the app was shut down.
We now have to develop the asp app and we can't quite work out which
technique we should be using:
1 - the original technique which seems like a huge waste of resources
for a web app - loading the data from the db into the dataset each time
the db access class is created. Which means that when data is required
it is returned from the dataset saving a connection, but has used a heap
of resources loading from the db in the first place. This also raises
the question of when to synchronise the dataset and the db.
2 - using datareaders to directly access the data required. When the
page loads it creates a db access class which has a connection and
methods which when called open the connection, pack the data into the
return object (which could be strings, collection, or user defined)
using the datareader and then close the connection and return the packed
object. We would in this case have insert methods which would then use
inserts, updates and deletes to directly update the database.
3 - using datasets from each method in the db access class instead of
one large dataset. So the methods would be like:
private DataSet GetProducts() etc..
instead of one large dataset. We would then have a update or delete
method or whatever which would take back a dataset and make the changes
directly to the database. The problem that this technique seems to have
is that you are creating a dataset in each method, which is failur
repetitive and may only contain a few rows.
If anyone can help by totally ruling out any of these options or
providing different techniques it would be greatly appreciated. I have
done some research about this but haven't been able to find a really
good resource that explains the preferred technique for a web app.
Thanks in advance. 3 1313
Hi DwC,
Since you need disconnected data (DataSet), datareader is not necessary.
It’s better to use dataadapter to fill dataset. And if your individual
Dataset is from single DB table, you don’t have to create your own inserts,
updates and deletes methods. You can use dataadapter (combining with
commandbuilder) to fill dataset. Then you can use dataset.Update method to
update data back to DB (commandbuilder can automatically generate
corresponding update (insert, delete, or update) command(s).
HTH
Elton Wang el********@hotmail.com
"DwC" wrote: Hi,
We have a ms access database that we will be using to develop a website which would have fairly low usage levels.
We have some experience with windows apps but not so much with asp.net projects. We have used ADO datasets previously for a windows application that we developed where the entire db was loaded into the dataset at the beginning of the application and the user made changes to the dataset which was then saved back to the db when the app was shut down.
We now have to develop the asp app and we can't quite work out which technique we should be using:
1 - the original technique which seems like a huge waste of resources for a web app - loading the data from the db into the dataset each time the db access class is created. Which means that when data is required it is returned from the dataset saving a connection, but has used a heap of resources loading from the db in the first place. This also raises the question of when to synchronise the dataset and the db.
2 - using datareaders to directly access the data required. When the page loads it creates a db access class which has a connection and methods which when called open the connection, pack the data into the return object (which could be strings, collection, or user defined) using the datareader and then close the connection and return the packed object. We would in this case have insert methods which would then use inserts, updates and deletes to directly update the database.
3 - using datasets from each method in the db access class instead of one large dataset. So the methods would be like: private DataSet GetProducts() etc.. instead of one large dataset. We would then have a update or delete method or whatever which would take back a dataset and make the changes directly to the database. The problem that this technique seems to have is that you are creating a dataset in each method, which is failur repetitive and may only contain a few rows.
If anyone can help by totally ruling out any of these options or providing different techniques it would be greatly appreciated. I have done some research about this but haven't been able to find a really good resource that explains the preferred technique for a web app.
Thanks in advance.
DataReaders are far more performant (mrrr, is that a word?) than
DataSets if all you are doing is _reading_ data from a DB. But if you have
to do any editing you'll probably want to use a DataSet. Just be sure to be
kind to the .NET Framework and call Dispose() on the DataSet object when you
no longer need it (don't just let it fall out of scope).
-- Sean M
"Elton W" <El****@discussions.microsoft.com> wrote in message
news:76**********************************@microsof t.com... Hi DwC,
Since you need disconnected data (DataSet), datareader is not necessary. It's better to use dataadapter to fill dataset. And if your individual Dataset is from single DB table, you don't have to create your own
inserts, updates and deletes methods. You can use dataadapter (combining with commandbuilder) to fill dataset. Then you can use dataset.Update method to update data back to DB (commandbuilder can automatically generate corresponding update (insert, delete, or update) command(s).
HTH Elton Wang el********@hotmail.com
"DwC" wrote:
Hi,
We have a ms access database that we will be using to develop a website which would have fairly low usage levels.
We have some experience with windows apps but not so much with asp.net projects. We have used ADO datasets previously for a windows application that we developed where the entire db was loaded into the dataset at the beginning of the application and the user made changes to the dataset which was then saved back to the db when the app was shut down.
We now have to develop the asp app and we can't quite work out which technique we should be using:
1 - the original technique which seems like a huge waste of resources for a web app - loading the data from the db into the dataset each time the db access class is created. Which means that when data is required it is returned from the dataset saving a connection, but has used a heap of resources loading from the db in the first place. This also raises the question of when to synchronise the dataset and the db.
2 - using datareaders to directly access the data required. When the page loads it creates a db access class which has a connection and methods which when called open the connection, pack the data into the return object (which could be strings, collection, or user defined) using the datareader and then close the connection and return the packed object. We would in this case have insert methods which would then use inserts, updates and deletes to directly update the database.
3 - using datasets from each method in the db access class instead of one large dataset. So the methods would be like: private DataSet GetProducts() etc.. instead of one large dataset. We would then have a update or delete method or whatever which would take back a dataset and make the changes directly to the database. The problem that this technique seems to have is that you are creating a dataset in each method, which is failur repetitive and may only contain a few rows.
If anyone can help by totally ruling out any of these options or providing different techniques it would be greatly appreciated. I have done some research about this but haven't been able to find a really good resource that explains the preferred technique for a web app.
Thanks in advance.
Although datareader has good performance, using it to fill dataset maybe not.
Elton
"Sean M" wrote: DataReaders are far more performant (mrrr, is that a word?) than DataSets if all you are doing is _reading_ data from a DB. But if you have to do any editing you'll probably want to use a DataSet. Just be sure to be kind to the .NET Framework and call Dispose() on the DataSet object when you no longer need it (don't just let it fall out of scope).
-- Sean M
"Elton W" <El****@discussions.microsoft.com> wrote in message news:76**********************************@microsof t.com... Hi DwC,
Since you need disconnected data (DataSet), datareader is not necessary. It's better to use dataadapter to fill dataset. And if your individual Dataset is from single DB table, you don't have to create your own inserts, updates and deletes methods. You can use dataadapter (combining with commandbuilder) to fill dataset. Then you can use dataset.Update method to update data back to DB (commandbuilder can automatically generate corresponding update (insert, delete, or update) command(s).
HTH Elton Wang el********@hotmail.com
"DwC" wrote:
Hi,
We have a ms access database that we will be using to develop a website which would have fairly low usage levels.
We have some experience with windows apps but not so much with asp.net projects. We have used ADO datasets previously for a windows application that we developed where the entire db was loaded into the dataset at the beginning of the application and the user made changes to the dataset which was then saved back to the db when the app was shut down.
We now have to develop the asp app and we can't quite work out which technique we should be using:
1 - the original technique which seems like a huge waste of resources for a web app - loading the data from the db into the dataset each time the db access class is created. Which means that when data is required it is returned from the dataset saving a connection, but has used a heap of resources loading from the db in the first place. This also raises the question of when to synchronise the dataset and the db.
2 - using datareaders to directly access the data required. When the page loads it creates a db access class which has a connection and methods which when called open the connection, pack the data into the return object (which could be strings, collection, or user defined) using the datareader and then close the connection and return the packed object. We would in this case have insert methods which would then use inserts, updates and deletes to directly update the database.
3 - using datasets from each method in the db access class instead of one large dataset. So the methods would be like: private DataSet GetProducts() etc.. instead of one large dataset. We would then have a update or delete method or whatever which would take back a dataset and make the changes directly to the database. The problem that this technique seems to have is that you are creating a dataset in each method, which is failur repetitive and may only contain a few rows.
If anyone can help by totally ruling out any of these options or providing different techniques it would be greatly appreciated. I have done some research about this but haven't been able to find a really good resource that explains the preferred technique for a web app.
Thanks in advance. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: sffan |
last post by:
I am new to database programming and was curious how others solve the
problem of storing encrypted in data in db table columns and then
subsequently searching for these records.
The particular...
|
by: Hamed |
last post by:
Hello
I have employed as a developer in a software company that its team uses
FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to
migrate to VS.NET. There is a project...
|
by: sedefo |
last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i
was researching how i can write a database independent data access layer. In
my company we already use Data Access...
|
by: Neil Ginsberg |
last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC
linked tables. I recently created a new set of tables for the app, and users
are complaining that unsaved data is being...
|
by: Andrew Arace |
last post by:
I scoured the groups for some hands on code to perform the menial task
of exporting table data from an Access 2000 database to Oracle
database (in this case, it was oracle 8i but i'm assuming this...
|
by: Tony Lee |
last post by:
Some time a ago, on this newsgroup the following comments were made in
recommending
good references for Access (2003)
>I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
|
by: Lyle Fairfield |
last post by:
In a recent thread there has been discussion about Data Access Pages. It
has been suggested that they are not permitted on many or most secure sites.
Perhaps, that it is so, although I know of no...
|
by: Johann Blake |
last post by:
I am looking for a good solution on how to implement data access in an
application so that there is a clean separation between the data access
layer, the business layer and the GUI layer. I am...
|
by: Grip |
last post by:
Hi,
I have gone throught the group and Microsoft's online help and have
seen many suggestions but I am still seeking clarity:
1. I have an excel spreadsheet. Column A contains text that may...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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: 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,...
| |