April 19, 2024, 02:07:19 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Database with password protect

Started by Pip1957, June 02, 2008, 08:44:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pip1957

Hi, Is it possible to create an mdb database with password protection in EB. Thanks

LarryMc

I'm almost positive that it is possible but I just don't know the specific string.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

JoaoAfonso

I am after this too... there must be a way for sure.
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900

Bruce Peaslee

I have Access on my machine, so setting the password is easy. This works to open a password protected database where the password is "test":


OPENCONSOLE
Def pdb as pointer
pdb = dbConnect("Microsoft Access Driver (*.mdb)",GETSTARTPATH + "db1.mdb","PWD=test")
if (pdb = null)
   print "Connection failed"
ELSE
   PRINT "Connection successful"
   DBDISCONNECT(pdb)
ENDIF
DO:UNTIL INKEY$ <> ""
CLOSECONSOLE
END

Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

JoaoAfonso

Hmm... was so easy, afterall. I mean, after reading this, I checked EB help, and in dbconnect help, the example shows exactly how to do it. Thanks, Peaslee. At least I have not paied much attention to help files, once again.
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900

Bruce Peaslee

The part I can't get is how to set the password when you create the db file in code. I use Access for most database applications because it makes it easy to create the file with sample data.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles