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_xamaketbl()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_XAMAKETBL()
Create table from specified arrays or string definitions

Syntax
N_XAMAKETBL(<cTable>, <cFile>, <aFields> | <cFields>, <aIndex> | <cIndex>)

RDD
CREATE FROM or __DBCREATE()

Arguments
<cTable> is ignored by RaSQL/B.  You may leave it blank.  It is used only by 
RaSQL/X.

<cFile> is the name of the Btrieve file that you want created. You may 
optionally include the drive and path.   If <cFile> omits a path name then 
RaSQL creates the Btrieve table in the directory named in N_XDATAPATH, if 
specified; otherwise in the current directory.

<Fields> is an array or string containing the file definition.  See Appendix 
B the format.

<Index> is an array or string containing the permanent index definition(s).  
See Appendix C for the format of this parameter.

Returns
True if successful. False on failure. Use N_XERROR() to get an error code.

Remarks
Creates a table from array or string definitions. It works similarly to 
N_XMAKETBL(), except that the latter uses an extended structure DBF as 
input. See N_XMAKETBL() for more information.

Example
* Create table with fields Lname, Fname,
* SSAN with index on SSAN 
* Index is unique and static.

DECLARE fields[3]
fields[1] = 'LNAME               C    20.   ;' 
*            FFFFFFFFFFFFFFFFFFFFTTLLLLL.DDb;

fields[2] = 'FNAME               C    15.   ;' 
fields[3] = 'SSAN                NP    5.0  ;'

DECLARE index[1]
index[1] = 'SSAN                X    dmnQSu;'
*           FFFFFFFFFFFFFFFFFFFFXXbbbDMNQSU;

* Create new table
N_XAMAKETBL('', ; && Ignored by RaSQL/B
                  ; && so leave it blank.
  'CLIENT.DAT',   ; && Btrieve file where
                  ; && data is stored.
   fields, index)


See Also: Appendix B N_XMAKETBL() N_XOWNER() N_XMAKENDX()

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