Can not retreive data from database
I have attempted to implement the datacontrol example in chapter 2 of Beginning ASP .Net book. However, I implemented the example using VS .Net. Whenever I open the page in explorer I get an error. The Jet database engine can not open the database because it is already open or does not have the permission. Keep in mind that I have tried the same code but for a Win application and everything was OK. Here is exactly what I did:
- Created the project with a Web Form.
- Added a Component
- Added and configured the Data Adapter and the Connection object and generated a dataset for that component with a public method to fill the dataset.
- Added a reference to the Component into the web form
- Added a typed dataset
- Added a grid to the web form and bound it to the typed dataset
- In the load function of the web form I called the Fill method of the component and bound the result to the grid.
I have gotten an error:
System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file 'D:\WebDevelopment\BegAsp\DatBase\Chapter2.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
It might be a matter of enabling ASP data access. If anyone when through this issue please let me know the solution.
Elie
eliea
|