Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_dbcreate():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_dbCreate():

  Syntax:   Sx_dbCreate( <cFile>, <aStru> )

            cFile = Name of database file to create.
            aStru = Multi-dimensional array defining the database structure.

  Returns:  NIL

  Description:

    Sx_dbCreate() behaves, for the most part, the same as Clipper's own
    dbCreate() function.  However, it adds a few enhancements that make
    using SIx 3.0 new "V" field-types easier to code.

    Sx_dbCreate() automatically adds six to the length of weakly-typed "V"
    fields, and supports entering strongly-typed "V" field types of "I,4"
    and "D,3", automatically translating them to "V,4" and "V,3",
    respectively.

    One of the primary reasons for this function is to support SIx 3.0's
    three-byte packed DATE values.  Clipper's dbCreate() function will not
    accept a "D" field of anything other than 8 bytes long.  You can
    pass dbCreate() a "V" field of three bytes, which is interpreted by
    SIx 3.0 as a packed DATE value anyway.  However, to make it simpler on
    the eyes to code, Sx_dbCreate() supports defining packed DATE values
    as a "D" type with a length of three bytes.

  Example:  // The following two function calls have the same result

            dbCreate( "TEST", {{ "LAST"    , "V", 16, 0},;
                               { "FIRST"   , "V", 16, 0},;
                               { "SALARY"  , "V",  4, 0},;
                               { "HIREDATE", "V",  3, 0},;
                               { "NOTES"   , "V",  6, 0}} )

         Sx_dbCreate( "TEST", {{ "LAST"    , "V", 10, 0},;
                               { "FIRST"   , "V", 10, 0},;
                               { "SALARY"  , "I",  4, 0},;
                               { "HIREDATE", "D",  3, 0},;
                               { "NOTES"   , "V",  0, 0}} )


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