ASP.NET data access



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.
.



Relevant Pages

  • Re: Please Urgent - Update Data Source Problem ???
    ... When the app starts, I'd check to see if the table exists. ... That'd probably be a preferable method to creating the database each time ... If you put connection close ... schedule, and they can update the existing schedule, add new schedule and ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: ASP.NET data access
    ... > Since you need disconnected data, datareader is not necessary. ... >> which was then saved back to the db when the app was shut down. ... >> it is returned from the dataset saving a connection, ... The problem that this technique seems to have ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OleDbConnection does not release Access database
    ... this is not a web app. ... a Microsoft Access database. ... the database connection, but that seems a little excessive for what ...
    (microsoft.public.dotnet.framework.adonet)
  • Threads
    ... I have an app that connects to a database every 15 seconds to gather data ... has been mostly developed on a broadband connection. ... with threads/processor time. ...
    (alt.comp.lang.borland-delphi)
  • Re: How to manually check for a DB connection at the Form Load event?
    ... you will not have any connections available to the database yet. ... Each instance of the app requires its own connection. ... > information that will be queried and written to a Data Grid on the Web ...
    (microsoft.public.dotnet.languages.vb)