Jet-drivers and password
Hi everyone,
1) As I am using the MSje-drivers to connect to my database, I would like to know how I open a database that is password protected with it.
Its easy to do with a normal driver, but I don't know how to do it with this one. Here is my noremal statement I use: (in ASP)
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db.mdb;Persist Security Info=False
its just that I have NO idea at all on how to connect to a database that I have password protected! Does anyone know that?
2) I allso have another problem.
I am VERY often getting this error message on my pages:
Microsoft JET Database Engine error '80004005'
Could not update; currently locked by user 'Admin' on machine 'PREMIUM4A'.
/game.asp, line 111
I am not sure if it has anything to do with my database, but I got a feeling that it does... I think that its because the database is locked by other users.
When I connect tot the database, I normally use "3, 2", because I thourght that was the best. But I am starting to believe that it might be locking the database!?
Can anyone give me a list of what all those means, and what I should use!?
I hope you know the ansver for all this.
Thanks in advance
~Casper Bang
Peter J. Boettcher posted this at 21:12 — 10th April 2001.
They have: 812 posts
Joined: Feb 2000
I'm not sure offhand since I don't use that provider, did you try:
UID=Username;PWD=Password
If that doesn't work try:
Username=Username;Password=Password
As for you're other problem, it can be a variety of things.
1) You're not closing your connections when you're finished
2) Someone has opened the database on the server
3) You've got a busy site and the Access database can't keep up
As for what cursor and locktype to use, it depends on what you're doing. If you're just returning some data and not updating or deleting then a forward only cursor with read-only lock type is fine (1,3) but if you're updating then you need to use something like (3,2)
PJ | Are we there yet?
pjboettcher.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.