Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DAO Problem

Status
Not open for further replies.

ALWilliams

Programmer
Jun 29, 2007
21
0
0
GB
I have a simple ASP page that uses a timer to populate some MI figures every 30 seconds or so.

There are 4 entries, 3 of these being mined from SQL server and the other from an Access Database.

The app works perfectly from my laptop but when I publish to the webserver the Access one fails with a multitude of errors from locked, cant find it or just errors.

I've tried changing the UNC path, mapping a drive even copying the access database locally but it wont work. I've checked the webserver and it has the DAO dll installed and in the correct location.

Any ideas?
 
Access is terrible with web apps. there are a number of reasons this could fail.

1. permissions. the user account accessing the Access Database needs Read/Write permissions to the directory because Access creates lock files when the db is open.
2. preformance. Access (and the Jet Db Engine) require heavy resources to open, query, close the connection.
3. how your code handles the errors. Are you disposing of the commands/connections properly?
4. the location of the Access Database. it should be within the virtual directory somewhere. App_Data is a good location if you must use an Access Database.
5. The server requires MS Office installed (i don't think you can install just Access).

it's always a good idea to deploy a web app to a testing/staging server before deploying to production. there are too many drastic differences between working on your local dev box and a production server.

I would look into replacing the Access database with either SqlExpress or SqLite as an alternative light weight database.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Thanks for the response jason...I've tried to provide some feedback to the points

1. Permissions are fine, the user has full access to the data.
2. Server specs should make this 'ok'
3. Yes all disposed of cleanly
4. Not too sure what you mean here (newbie alert!) - the database is on our network as it is used as the datastore for a processing system so I cant have it on the web server.
5. The web server needs to have office installed on it to use access??? why is that - the DAO dll is on the server am I missing something here?

Our web server is only for our internal use at present - we havent rolled this out to all yet. The system was developed in Access as we didnt have a SQL server installation in place at the time (we now do) which is why the other 3 are fine. We havent had the time/resource to convert this to SQL as of yet.

Hope this makes sense.!
 
1. Permissions are fine, the user has full access to the data.
the user in question is effected by the credentials the website runs under. what authentication mode are you using? if Windows are you impersonating the user? can anonymous users access the system (IIS setting)?
2. Server specs should make this 'ok'
this has to do with the jet engine, not the hardware.
4. Not too sure what you mean here (newbie alert!) - the database is on our network as it is used as the datastore for a processing system so I cant have it on the web server.
if the database is on a remote server then the IIS server needs delegation rights to access the remote file. and the permissions of said user must apply to this remote file. Delegation is an Active Directory option from computer to computer.
5. The web server needs to have office installed on it to use access??? why is that - the DAO dll is on the server am I missing something here?
I could be wrong, but this it's been my experience (very limited as I abhor access) that the server must have office installed. the DAO uses ADO.Net. ADO.Net intern accesses the appropriate system drivers to access the database. Maybe you only need the Jet Db Engine, not the full Office suite.

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top