home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / prg_sup / pwrtbl / routines.txt < prev    next >
Text File  |  1994-08-21  |  5KB  |  145 lines

  1.  
  2.                                PowerTABLE 1.1  
  3.                                     =====
  4.  
  5.                              Routine description
  6.  
  7.  
  8. *************************************************************************************
  9. db_AddIndex()
  10. *************************************************************************************
  11.  
  12. Purpose:       Function to add a new index to an openeded database
  13. Prototype in:    COMPACT.BAS
  14. Syntax:        tf = db_AddIndex% (db As Database, tablename$, ixn$, ixf$, ixu%, ixp%)
  15.  
  16. Parameters:    db        - the database object variable
  17.                 tablename - the name of the sourcetable
  18.                 ixn       - the name for the new index
  19.                 ixf       - list of fields for the new index
  20.                 ixu       - true if it┤s a unique index, false if not
  21.                 ixp       - true if it┤s a primary index, false if not
  22.  
  23. Returns:        True if index was successfully generated.
  24.                 False if an error has occured.
  25.  
  26.  
  27. Example:
  28.         dim db as database, tb as table
  29.                 set db=opendatabase ("MYDATA.MDB")
  30.                 set tb=db.opentable("MYTABLE")
  31.                 if db_AddIndex ( db, tb, "NewIndex","+Field1;+Field2",False,False ) then
  32.                    msgBox "Ok"
  33.                 else
  34.                    msgBox "Error"
  35.                 end if
  36.  
  37.  
  38.  
  39. *************************************************************************************
  40. dbf_CompactDatabase() 
  41. *************************************************************************************
  42.  
  43. Purpose:    Compacts an entire xBase database 
  44. Prototype in:    COMPACT.BAS
  45. Syntax:        tf = dbf_CompactDatabase ( dbName$, dbConnect$ )
  46.  
  47. Parameters:    dbName      - the name/directory of the database
  48.                 dbConnect - the connect-property
  49.                             either "dbase iv;" or "foxpro 2.5;"
  50.  
  51. Returns:    True if successful, False if not
  52.  
  53. Remarks:    The database will be opened for exclusive usage.
  54.  
  55. Example:    tf = dbf_CompactDataBase ("C:\MYPROJ","dbase iv;")
  56.  
  57.  
  58.  
  59. *************************************************************************************
  60. dbf_CompactTable()
  61. *************************************************************************************
  62.  
  63. Purpose:    Compacts a single xBase table 
  64. Prototype in:    COMPACT.BAS
  65. Syntax:        tf = dbf_CompactTable ( dBName$, dBConnect$, tablename$ )
  66.  
  67. Parameters:    dBName    - Name/Directory of the database
  68.                 dbConnect - the connect-property
  69.                             either "dbase iv;" or "foxpro 2.5;"
  70.         tableName - Name of the table
  71.  
  72. Returns:    True if successful, False if not
  73.  
  74. Remarks:    The database will be opened for exclusive usage.
  75.  
  76. Example:    tf = dbf_CompactTable ( "C:\MYPROJ","foxpro 2.5;","CUSTOM" )
  77.  
  78.  
  79.  
  80. *************************************************************************************
  81. ini_InitDataAccess()
  82. *************************************************************************************
  83.  
  84. Purpose:    Initializes VBRUN300.DLL for access to external databases
  85. Prototype in:    AUTOINI.BAS
  86. Syntax:        ini_initDataAccess
  87.  
  88. Parameters:    (none)
  89. Returns:    (nothing)
  90.  
  91. Remarks:    This routine creates or corrects an .INI file automatically,
  92.                 if you want to access external tables in your program.
  93.                 The name of the created .INI-file is the name of your application
  94.                 and it┤s stored into the home-directory of your program - not
  95.                 in your Windows-directory.
  96.                 Call this routine at the entry of your program, and the message:
  97.                 "Installable ISAM not found!" is history.
  98.  
  99. Example:    sub main
  100.             ini_initDataAccess
  101.                     .
  102.                     mdiForm.show 1
  103.                     .
  104.                 end sub
  105.  
  106.                 - or -
  107.        
  108.                 sub frmMain_load ()
  109.                     ini_initDataAccess
  110.                     .
  111.                     .
  112.                     .
  113.                 end sub               
  114.  
  115.  
  116. *************************************************************************************
  117. ini_do()
  118. *************************************************************************************
  119.  
  120. Purpose:    Reads or writes a profile value from/to your private .INI file
  121. Prototype in:    AUTOINI.BAS
  122. Syntax:        ini_do section$, key$, value, R/W
  123.  
  124. Parameters:    section - the section where the string is located
  125.                           If section is "", the previous name is used again.
  126.                 key     - the key name
  127.                 value   - the returned or written value
  128.                 R/W     - True if the value should be written to the file,
  129.                           False if the value will be returned
  130.  
  131. Returns:    value, if R/W was false
  132.  
  133. Remarks:    This function does not require a filename.
  134.                 The name of the .INI-file is the name of your application
  135.                 and it┤s stored into the home-directory of your program - not
  136.                 in your Windows-directory.
  137.  
  138. Example:    ini_do "Data-Access","Username",uname,False
  139.         msgBox "Your Name is " & uname
  140.  
  141.         This sequence would read a section like that:
  142.  
  143.         [Data-Access]
  144.         Username=Mr.Big
  145.