Groups > dBase > dBase programming > Re: Protect




Protect

Protect
Sun, 13 Apr 2008 15:29:47 -040
How do you programmatically open a file that has been protected with the
"Protect" command?  OLH does not give examples.

Post Reply
Re: Protect
Sun, 13 Apr 2008 17:14:02 -040
Charles Wrote:

> How do you programmatically open a file that has been protected with the
"Protect" command?  OLH does not give examples.
> 
> Charles
 
A little clarification:  How do I input the Group, User, and Password
programmatically?

Post Reply
Re: Protect
Mon, 14 Apr 2008 01:24:30 -040
In article <IaseMtanIHA.1640@news-server>, grahamcp@verizon.net says...
> Charles Wrote:
> 
> > How do you programmatically open a file that has been protected with
the "Protect" command?  OLH does not give examples.
> > 
> > Charles
>  
> A little clarification:  How do I input the Group, User, and Password
programmatically?
> 
> Charles
 

Charles,

If you are using OOP (datamodules, query, etc.) you can use the SESSION 
object and its .login() property.

If you are using XDML (USE myTable, scan/endscan, etc.), then you will 
need this old news group message:

-----------------------------------------------------------------------
From: Romain Strieff [dBVIPS] <dBVIPS@usa.net>
Newsgroups: dbase.programming
Subject: Re: Auto entry of Encryption password....
Date: Wed, 3 Nov 1999 18:36:36 +0100
Message ID: <MPG.128a7c1e14b264ac98a7bf@news.dbase2000.com>
? List All Messages with this Subject 
In article <7vphn1$g0r$1@news.dbase2000.com>, Paul Robichaud politely 
paraphrased ...
> In vdbase 5.7, when the program opens a file, how do you program it to
enter
> it automaticly (Group, user and password.), and make it so it will only
ask
> for it once while the program is running.
> 
See boilerplate below:



MAKE A BACKUP OF ALL YOUR TABLES DBTS AND INDEX FILES

Run PROTECT, chose a long complicated password with chrs and number
 and write it immediately down and store it into a secure place.

Select the [ENFORCEMENT] tab and select
 WHEN OPENING AN ENCRYPTED TABLE.

Select [USERS] and enter a username, groupname and password 

Write them down.

Select [TABLES]

Add all the tables you want to protect

Exit PROTECT.

Now let's assume you entered ROBERT,MAIN,TRUSTNO1
 as name, group, password

In the beginning of your program(or QBE or whatever), where you open
 the first of your PROTECTed tables, use the following code:

cn="ROBERT"
cG="MAIN"
*--make it complicater than this so that it will not be visible when 
_viewing_
*-- the EXEin an Editor
cP="TRUSTNOTONEPERSON"
cP=left(cP,6)+"1" 

      If Type("LockWindowUpdate") # "FP"
          extern CLOGICAL LockWindowUpdate(CHANDLE) User
      EndIf
      If Type("GetDeskTopWindow") # "FP"
          extern  CHANDLE   GetDeskTopWindow ( CVOID )  USER
      Endif
      *--this will lock the screen
      LockWindowUpdate(GetDeskTopWindow())  && Freeze
      
      *--put data to type into the login dialog in the keyboard buffer
      keyboard cn+chr(9)+cg+CHR(9)+Cp+CHR(13)

      *--this will trigger the login screen which will never appear 
because of
      *--the locked windows and will be filled-in completely 
automatically

      USE MYTABLE

      LockWindowUpdate(0)  && Unfreeze
-- 
Romain Strieff [dBVIPS]

help searching for ET when your computer is idle
http://setiathome.ssl.berkeley.edu/
join the dBASE users group there

Home | Top | Search

-----------------------------------------------------------------------


-- 
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
Re: Protect
Tue, 15 Apr 2008 00:14:43 -040
Geoff,

Thank you for your reply.  I added the code to my app, but when run I get an
error "Error loading DLL:  User"

Is there a DLL associated with this?

On a side note, where can we access the old news group messages?

Charles

*********

Geoff Wass [dBVIPS] Wrote:

> In article <IaseMtanIHA.1640@news-server>, grahamcp@verizon.net
says...
> > Charles Wrote:
> > 
> > > How do you programmatically open a file that has been protected
with the "Protect" command?  OLH does not give examples.
> > > 
> > > Charles
> >  
> > A little clarification:  How do I input the Group, User, and Password
programmatically?
> > 
> > Charles
>  
> 
> Charles,
> 
> If you are using OOP (datamodules, query, etc.) you can use the SESSION 
> object and its .login() property.
> 
> If you are using XDML (USE myTable, scan/endscan, etc.), then you will 
> need this old news group message:
> 
> -----------------------------------------------------------------------
> From: Romain Strieff [dBVIPS] <dBVIPS@usa.net>
> Newsgroups: dbase.programming
> Subject: Re: Auto entry of Encryption password....
> Date: Wed, 3 Nov 1999 18:36:36 +0100
> Message ID: <MPG.128a7c1e14b264ac98a7bf@news.dbase2000.com>
> ? List All Messages with this Subject 
> In article <7vphn1$g0r$1@news.dbase2000.com>, Paul Robichaud politely

> paraphrased ...
> > In vdbase 5.7, when the program opens a file, how do you program it to
enter
> > it automaticly (Group, user and password.), and make it so it will
only ask
> > for it once while the program is running.
> > 
> See boilerplate below:
> 
> 
> 
> MAKE A BACKUP OF ALL YOUR TABLES DBTS AND INDEX FILES
> 
> Run PROTECT, chose a long complicated password with chrs and number
>  and write it immediately down and store it into a secure place.
> 
> Select the [ENFORCEMENT] tab and select
>  WHEN OPENING AN ENCRYPTED TABLE.
> 
> Select [USERS] and enter a username, groupname and password 
> 
> Write them down.
> 
> Select [TABLES]
> 
> Add all the tables you want to protect
> 
> Exit PROTECT.
> 
> Now let's assume you entered ROBERT,MAIN,TRUSTNO1
>  as name, group, password
> 
> In the beginning of your program(or QBE or whatever), where you open
>  the first of your PROTECTed tables, use the following code:
> 
> cn="ROBERT"
> cG="MAIN"
> *--make it complicater than this so that it will not be visible when 
> _viewing_
> *-- the EXEin an Editor
> cP="TRUSTNOTONEPERSON"
> cP=left(cP,6)+"1" 
> 
>       If Type("LockWindowUpdate") # "FP"
>           extern CLOGICAL LockWindowUpdate(CHANDLE) User
>       EndIf
>       If Type("GetDeskTopWindow") # "FP"
>           extern  CHANDLE   GetDeskTopWindow ( CVOID )  USER
>       Endif
>       *--this will lock the screen
>       LockWindowUpdate(GetDeskTopWindow())  && Freeze
>       
>       *--put data to type into the login dialog in the keyboard buffer
>       keyboard cn+chr(9)+cg+CHR(9)+Cp+CHR(13)
> 
>       *--this will trigger the login screen which will never appear 
> because of
>       *--the locked windows and will be filled-in completely 
> automatically
> 
>       USE MYTABLE
> 
>       LockWindowUpdate(0)  && Unfreeze
> -- 
> Romain Strieff [dBVIPS]
> 
> help searching for ET when your computer is idle
> http://setiathome.ssl.berkeley.edu/
> join the dBASE users group there
> 
> Home | Top | Search
> 
> -----------------------------------------------------------------------
> 
> 
> -- 
> Geoff Wass [dBVIPS]
> Montréal, Québec, Canada
> 
> .|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
> .|.|.| ---------------------------------------------------------- |.|.|.
> .|.|.|             IT Consultant http://Geoff_Wass.com            |.|.|.
Post Reply
Re: Protect
Tue, 15 Apr 2008 01:19:35 -040
Geoff, (or anybody!)

Another problem with the Protect command.  When I attempted to add another User
in the security window for table  protection (I already had one as a test,) it
was ignored.  they would open with the previously entered User info, but not
with the newly assigned User account.  I tried deleting all the users and
restarted dBASE, but when I opened a formerly protected dbf I was asked for the
security info again.  Of course, since there was no User data, I couldn't open
it.  I had to re-enter and use the same group name to open the files.  I was
allowed to change the User ID and password.  Also, there are now 4 (I had 4
files protected) identical additional entries in the security window under my
re-created User ID info.  They are mostly symbols and letters.  They will
delete, but when I re-open the security window with the Protect command they
reappear.  I've closed and re-opened dBase and even re-booted my computer, but
they still show up.  How do I erase the falicious User entries permanently? 
Also, if I want to unprotect a dbf, how do I go about doing that, since deleting
the User info wasn't enough?  FYI all my dbfs were empty when initially
protected.

Charles

Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact