How to know if a MDB is Build encrypted ?

  • Thread starter javiernews via AccessMonster.com
  • Start date
J

javiernews via AccessMonster.com

Hi,

Is it any way to know pragmatically (via code) if an MDB format file is it
build encrypted or Not encrypted ???

thank you

Javier
 
T

Tony Toews [MVP]

javiernews via AccessMonster.com said:
Is it any way to know pragmatically (via code) if an MDB format file is it
build encrypted or Not encrypted ???

Create an encrypted MDB and open it via code using whatever method you
want to use. See what error message comes up.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
J

javiernews via AccessMonster.com

Thank you Tony !


"Create an encrypted MDB and open it via code using whatever method you
want to use. See what error message comes up."

Do Not shows any error, I can open normally

so I tried this other way:

Sub Encrypt(strDBNotEncrypted As String, strDBEncrypted As String)
DBEngine.CompactDatabase strDBNotEncrypted, strDBEncrypted, dbLangGeneral,
dbEncrypt
End Sub

But the only error 3356 "You attempted to open a Data Base that is already
opened exclusively by user 'Admin' ...... Try again when database is
available"

But this trapped error does Not shows if the BD is encrypted or Not encrytped.


Any help ?
 
R

Rick Brandt

javiernews said:
Thank you Tony !


"Create an encrypted MDB and open it via code using whatever method
you
want to use. See what error message comes up."

Do Not shows any error, I can open normally

so I tried this other way:

Sub Encrypt(strDBNotEncrypted As String, strDBEncrypted As String)
DBEngine.CompactDatabase strDBNotEncrypted, strDBEncrypted,
dbLangGeneral, dbEncrypt
End Sub

But the only error 3356 "You attempted to open a Data Base that is
already opened exclusively by user 'Admin' ...... Try again when
database is available"

But this trapped error does Not shows if the BD is encrypted or Not
encrytped.


Any help ?

Why do you need to know? To Access it makes no difference as far as I know.
 
J

javiernews via AccessMonster.com

Good question, maybe for Access is No deference but for users it is !

1-If DB is ENCODED (build Access encryption) Access runs 15% slower in same
cases,,.... (this Not a problem in this case)

2-If DB is DECODED (build Access de-cryption) the DB is Not soo secure and I
want to notify users about it.

Any body knows the answer ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top