Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RaSQL/B 6.1a for Clipper - <b>n_xowner()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XOWNER()
Set/get owner for opening/creating tables

Syntax
N_XOWNER([<cOwner> [, <nCreatemode>]])

Arguments
<cOwner> is the name of the owner. An owner name may be up to eight 
characters long. The owner name will remain in effect until changed by a 
subsequent call to N_XOWNER().

N_XOWNER(""), with a null string as the first argument, clears the owner 
name from the environment.

<nCreatemode> is an optional argument used only to determine how subsequent 
calls to the N_XMAKETBL() function will execute, and is ignored at all other 
times.

     Value        Mode
     0              No access to file without owner name. (Default)
     1              Readonly access to file without owner name.
     2              Same as 0, except data will be encrypted.
     3              Same as 1, except data will be encrypted.

Returns
With no arguments, returns the owner name currently in effect.

Remarks
If a table has been created with an owner, then the owner's name acts like a 
password. Before you can open the table, you must first pass the owner name. 
If a file has no owner,  Btrieve ignores N_XOWNER;  you do not need to issue 
N_XOWNER('').

For instance, if Someones is the owner of table Stuff, then your application 
must set the current owner to Someones before attempting to use the table 
Stuff.

N_XOWNER('Someones')
N_XUSE('Stuff')

When you create a new table with N_XMAKETBL(), whatever owner name is 
currently in effect will be the name assigned as the new table's owner. You 
should take care, therefore, to establish the desired ownership before 
creating a new table.

Example
N_XOWNER('Jonathan')
N_XUSE('clients.dat, ...)

N_XOWNER('Christina')
N_XMAKETBL(' ','newtable.dta', ;
  'rasql.dbf')


See Also: N_XUSE() N_XMAKETBL()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson