SP_PROGCOUNT

PROGCOUNT()

  Short:
  ------
  PROGCOUNT() Perform a count with a progress box

  Returns:
  --------
  Nil

  Syntax:
  -------
  PROGCOUNT(expCondit,[cMessage],[lPause])

  Description:
  ------------
  Pops up a progress bar box with PROGON().
  Performs a COUNT on the current DBF using
  <expCondit> as the FOR condition. (can be passed as a
  codeblock or a string).

  [cMessage] is an optional box title for the progress
  box

  [lPause] if True will pause before removing the box
  with PROGOFF()- default is False.

  Examples:
  ---------

   use customer

   ProgCount("[S]$LNAME")
   ProgCount({||"S"$LNAME},"Counting",.t.)

  Source:
  -------
  S_PROG.PRG

See also : PROGDISP(), PROGEVAL(), PROGINDEX(), PROGOFF(), PROGON()

SP_FULLDIR

FULLDIR()

  Short:
  ------
  FULLDIR() Interactively navigate directories

  Returns:
  --------
  <lSelected> => Directory was selected

  Syntax:
  -------
  FULLDIR([lChange],[@cDirName])

  Description:
  ------------
  Interactively navigates directories on the current
  drive.

  Allows reading of a file ( with FILEREAD() ) in a
  directory.

  If file is DBF, does a DBEDIT browse (watch your
  memory..)

  [lChange]    True - change to selected directory
               False - don't change to selected directory
               Default is True - change

  [@cDirName] Char string passed by reference, will
  contain name of selected directory on return.

  Examples:
  ---------
   cNewDir := ""

   if FULLDIR(.F.,@cNewDir)
       SET DEFAULT TO (cNewDir)
       ?"New directory is:"
       ?Curdir()
   endif

   if FULLDIR(.t.)
       ?"New directory is:"
       ?Curdir()
   endif

  Source:
  -------
  S_FULLD.PRG

 

SP_FREQANAL

FREQANAL()

  Short:
  ------
  FREQANAL() Performs a frequency analysis on a DBF

  Returns:
  --------
  Nothing

  Syntax:
  -------
  FREQANAL()

  Description:
  ------------
  Performs a point&shoot frequency analysis on selected
  fields of the DBF.

  Allows for tallying of additional numeric fields.

  New to 3.5 - now allows fields of type C D and N to be added
  to the frequency string. Additional Summary fields are now named
  SUM_1, SUM_2...etc in the output results. (previously they retained
  their original name)

  Examples:
  ---------
   USE (cDbfName)

   FREQANAL()

  Source:
  -------
  S_FREQ.PRG

 

SP_DBSTATS

DBSTATS()

  Short:
  ------
  DBSTATS() Statistical report on dbf, including
  sum/avg/min/max/std/var/count

  Returns:
  --------
  Nothing

  Syntax:
  -------
  DBSTATS()

  Description:
  ------------
  This is a point & shoot metafunction which allows the
  user to get statistical data on a dbf, particularly with
  numeric fields.

  Statistics available are: count, sum, average,
  minimum, maximum, variance and standard deviation. the analysis
  may also be based on a conditional criteria.

  Examples:
  ---------
   use (cDbfName)

   DBSTATS()    // its a menu driven metafunction

  Source:
  -------
  S_DBSTAT.PRG

 

SP_COPYITOUT

 COPYITOUT()

  Short:
  ------
  COPYITOUT() Copies records to a new DBF

  Returns:
  --------
  nothing

  Syntax:
  -------
  COPYITOUT()

  Description:
  ------------
  Copies records to a new DBF, with query and tagging
  options.

  Examples:
  ---------
   Use (dbf_file)

   COPYITOUT()

  Notes:
  -------
  For more control, see COPYFIELDS(). If field
  selection is not needed, use COPYITOUT(), which is smaller and
  faster.

  Source:
  -------
  S_COPY.PRG

 

SP_COPYFIELDS

COPYFIELDS()

  Short:
  ------
  COPYFIELDS() Copies selected fields of selected records to new dbf

  Returns:
  --------
  None

  Syntax:
  -------
  COPYFIELDS([aFields,[aDescript]])

  Description:
  ------------
  This metafunction allows selection of fields, and
  selection of record criteria (filter) to be copied to a new DBF.

  [aFields]  is an array of valid field names. Default
  is all fields. Fields not of the current area are not allowed.

  [aDescript] is an array of field descriptions, which
  can only be passed if [aFields]  is passed, and which must
  reflect the fields in [aFields]

  Examples:
  ---------
   use (cDbfName)

   COPYFIELDS()  // its a metafunction...

  Source:
  -------
  S_COPYF.PRG

 

SP_BLDDBF

BLDDBF()

  Short:
  ------
  BLDDBF() Create a DBF from a delimited string or an array

  Returns:
  --------
  <lSuccess> => Success or failure

  Syntax:
  -------
  BLDDBF(cDbfName,acDefinition)

  Description:
  ------------
  Creates DBF file named <cDbfName> from delimited
  strings in <acDefinition>.

  <acDefinition>  is either:

  1.  a Delimited string in the form
      "name,type,[size],[decimals]:name,type..."
      Fields delimited by colon, field elements delimited by commas

  2.  an array of delimited strings in
      the form "name,type,[size],[decimals]". One field
      per array element, field elements delimited by
      commas.

  Examples:
  ---------
   1. Passing long delimited string

       BLDDBF('CUSTOMER','LNAME,C,15:FNAME,;
         C,10:AGE,N,2:PROSPECT,L:')

   2. Passing array of short delimited strings

       aNewdbf       := array(4)
       aNewdbf[1]    :="LNAME,C,15"
       aNwdbf[2]     :="FNAME,C,10"
       aNewdbf[3]    :="AGE,N,2"
       aNewdbf[4]    :="PROSPECT,L"
       lSuccess      := BLDDBF('CUSTOMER',aNewdbf)

  Notes:
  -------
  BLDDBF() expects an unused area to work in, and will
  return .f. if it detects a DBF open in the current area. An
  overwrite will not be allowed. BLDDBF() uses Clipper's low level
  file functions to create the DBF file. You could also (and
  should) use Clipper 5.01's DBCREATE() function. This function is
  here mainly for compatibility with previous SuperLibs.

  Source:
  -------
  S_BLDBF.PRG

SP_ARRAY2DBF

ARRAY2DBF()

  Short:
  ------
  ARRAY2DBF() Replaces current record with values in an array

  Returns:
  --------
  Nil

  Syntax:
  -------
  ARRAY2DBF(aValues)

  Description:
  ------------
  Replaces the values in the current record with the
  values in <aValues>. Array order is assumed to be the same as
  the ordinal field order.

  Examples:
  ---------
   use customer
   a := DBF2ARRAY()            // store values

   for i = 1 to len(a)
     @0+i,0 get a[i]
   next
   read                        // edit them

   if AUPDATED(a)              // if they were updated from
                               // the DBF values
     ARRAY2DBF(a)              // save them
   endif

  Source:
  -------
  S_DBARR.PRG

 

C5_DBF

 DBF()*
 Return current alias name
------------------------------------------------------------------------------
 Syntax

     DBF() --> cAlias

 Returns

     DBF() returns the alias of the current work area as a character string.
     If there is no active database file in the current work area, DBF()
     returns a null string ("").

 Description

     DBF() is a compatibility function that replicates the DBF() function in
     dBASE III PLUS.  Clipper implements it by invoking the ALIAS()
     function without an argument.

     DBF() is a compatibility function and, therefore, no longer recommended.
     It is superseded entirely by the ALIAS() function.

 Files   Library is EXTEND.LIB, source file is SOURCE\SAMPLE\DBF.PRG

See Also: ALIAS() USED()

 

Copy Protection

How I can protect my application against copying?

May be exist many ways. One of theme is using HD serial number.

1. Read volume serial number of hard disk(s) of your customer. ( Apply this procedure while installation, once only one and preferably manually.  Of course you can obtain this info by online accessing to system of your customer. )

2. Record this info ( after crypt ) anywhere you like in the customer system: in a .MEM file, a .dbf / dbt, in registry, even directly into your application as a literal constant.

3. Your application will begin to run by reading this recorded data and compare it with actual HD serial number of customer; if match continue working, else …

Here an example to get  HD serial number.