Ooops
November 27, 2020, 05:15:08 PM

Author Topic: [bb] Cheetah DB by Knotz [ 1+ years ago ]  (Read 874 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Cheetah DB by Knotz [ 1+ years ago ]
« on: June 29, 2017, 12:28:39 AM »
Title : Cheetah DB
Author : Knotz
Posted : 1+ years ago

Description : Cheetah DB is a free DBase III compatible databse engine. It's robust, fast and has multi-user capabilities.

Look at Paul Squires' website to get Cheetah:
<a href="http://www.planetsquires.com/" target="_blank">http://www.planetsquires.com[/url]


Code :
Code: BlitzBasic
  1. .lib "Cheetah2.dll"
  2.  
  3. ; ----------------------------------------------------------------------------------------------------
  4. ; DATABASE ROUTINES - Creation/Opening/Closing
  5. ; ----------------------------------------------------------------------------------------------------
  6. xdbCreate(dbFile$, AllFields$):"XDBCREATE_Z"
  7. xdbCreateExtended (tFileName$, AllFields$, MemoBlockSize%, Algorithm%, EncryptionKey$):"XDBCREATEEXTENDED_Z"
  8. xdbOpen% (dbFile$, EncryptionKey$):"XDBOPEN_Z"
  9. xdbOpenEX%(dbFile$, AccessMode%, ShareMode%, EncryptionKey$):"XDBOPENEX_Z"
  10. xdbAlias%(dbHandle%):"XDBALIAS_Z"
  11. xdbSetAlias(dbHandle%, AliasName$):"XDBSETALIAS_Z"
  12. xdbCreateFields(mFileName$):"XDBCREATEFIELDS_Z"
  13. xdbCreateFieldsExtended(mFileName$, MemoBlockSize%, Algorithm%, EncryptionKey$):"XDBCREATEFIELDSEXTENDED_Z"
  14. xdbAddField(FieldInfoString$):"XDBADDFIELD_Z"
  15. xdbClose(dbHandle%):"XDBCLOSE_Z"
  16. xdbCloseAllIndexes(dbHandle%):"XDBCLOSEALLINDEXES_Z"
  17.  
  18. ; ----------------------------------------------------------------------------------------------------
  19. ; DATABASE ROUTINES - MultiUser % Locking  
  20. ; ----------------------------------------------------------------------------------------------------
  21. xdbMultiUser(TrueFalse%, NumRetries%, WaitTime%):"XDBMULTIUSER_Z"  
  22. xdbFailedLockInfo(DBFhandle%, zReason%, zUsername%, zWorkstation%, zLockDate%, zLockTime%):"XDBFAILEDLOCKINFO_Z"
  23. xdbSetExclusiveLock%(DBFhandle%):"XDBSETEXCLUSIVELOCK_Z"  
  24. xdbRemoveExclusiveLock(DBFhandle%, LOCK_NUM%):"XDBREMOVEEXCLUSIVELOCK_Z"  
  25. xdbSetEditLock%(DBFhandle%, RecordNumber%) :"XDBSETEDITLOCK_Z"
  26. xdbRemoveEditLock(DBFhandle%, LOCK_NUM%):"XDBREMOVEEDITLOCK_Z"  
  27. xdbIsEditLock%(DBFhandle%, RecordNumber%):"XDBISEDITLOCK_Z"  
  28.  
  29. ; ----------------------------------------------------------------------------------------------------
  30. ; DATABASE ROUTINES - Adding/Deleting Records
  31. ; ----------------------------------------------------------------------------------------------------
  32. xdbAddRecord(dbHandle%):"XDBADDRECORD_Z"
  33. xdbAppendRecord(DBFhandle%):"XDBAPPENDRECORD_Z"
  34. xdbClearBuffer(dbHandle%):"XDBCLEARBUFFER_Z"
  35. xdbPutRecord(dbHandle%, RN%):"XDBPUTRECORD_Z"
  36. xdbGetRecord(dbHandle%, RN%):"XDBGETRECORD_Z"
  37. xdbDeleteRecord(DBFhandle%, RecordNumber%):"XDBDELETERECORD_Z"
  38. xdbRecallRecord(DBFhandle%, RecordNumber%):"XDBRECALLRECORD_Z"
  39. xdbDeleted%(DBFhandle%, RecordNumber%):"XDBDELETED_Z"
  40. xdbFlushDatabase(dbHandle%):"XDBFLUSHDATABASE_Z"
  41. xdbPack( DBFhandle%):"XDBPACK_Z"
  42. xdbZap( DBFhandle%):"XDBZAP_Z"
  43. xdbRecordBuffer%(DBFhandle%):"XDBRECORDBUFFER_Z"
  44. xdbSpeedAppend(DBFhandle%, TrueFalse%):"XDBSPEEDAPPEND_Z"
  45.  
  46. ; ----------------------------------------------------------------------------------------------------
  47. ; DATABASE ROUTINES - Database Information
  48. ; ----------------------------------------------------------------------------------------------------
  49. xdbRecordCount%(dbHandle%):"XDBRECORDCOUNT_Z"
  50. xdbFieldCount%(dbHandle%):"XDBFIELDCOUNT_Z"
  51. xdbFieldNumber%(dbHandle%, FieldName$):"XDBFIELDNUMBER_Z"
  52. xdbRecordNumber%(DBFhandle%):"XDBRECORDNUMBER_Z"
  53. xdbLastUpdated(dbHandle%, YearNr%, MonthNr%, DayNr%):"XDBLASTUPDATED_Z"
  54. xdbFieldInfo(DBFhandle%, FieldNumber%, zFieldName%, zFieldType%, FieldLength%, FieldDecimals%):"XDBFIELDINFO_Z"
  55. xdbFieldName%(DBFhandle%, FieldNumber%):"XDBFIELDNAME_Z"
  56. xdbFieldType%(DBFhandle%, FieldNumber%):"XDBFIELDTYPE_Z"
  57. xdbFieldLength%(DBFhandle%, FieldNumber%):"XDBFIELDLENGTH_Z"
  58. xdbFieldDecimals%(DBFhandle%, FieldNumber%):"XDBFIELDDECIMALS_Z"
  59. xdbDatabaseHandles(DBFfilename$, CheetahHandle%, WindowsHandle%):"XDBDATABASEHANDLES_Z"
  60. xdbIndexHandles(IDXfilename$, CheetahHandle%, WindowsHandle%):"XDBINDEXHANDLES_Z"
  61.  
  62. ; ----------------------------------------------------------------------------------------------------
  63. ; DATABASE ROUTINES - Navigating the Database
  64. ; ----------------------------------------------------------------------------------------------------
  65. xdbEOF%(DBFhandle%):"XDBEOF_Z"
  66. xdbBOF%(DBFhandle%):"XDBBOF_Z"
  67. xdbMoveFirst(DBFhandle%, idxHandle%):"XDBMOVEFIRST_Z"
  68. xdbMoveNext(DBFhandle%, idxHandle%):"XDBMOVENEXT_Z"
  69. xdbMoveLast(DBFhandle%, idxHandle%):"XDBMOVELAST_Z"
  70. xdbMovePrev(DBFhandle%, idxHandle%):"XDBMOVEPREV_Z"
  71. xdbSkipDeleted(DBFhandle%, TrueFalse%):"XDBSKIPDELETED_Z"
  72. xdbKeyPosition%(IDXhandle%, KeyPosition%):"XDBKEYPOSITION_Z"  
  73.  
  74. ; ----------------------------------------------------------------------------------------------------
  75. ; DATABASE ROUTINES - Assigning Field Values
  76. ; ----------------------------------------------------------------------------------------------------
  77. xdbAssignField(dbHandle%, FieldName$, FieldNumber%, FieldString$):"XDBASSIGNFIELD_Z"
  78. xdbAssignFieldINT(dbHandle%, FieldName$, FieldNumber%, FieldInteger%):"XDBASSIGNFIELDINT_Z"
  79. xdbAssignFieldLNG(dbHandle%, FieldName$, FieldNumber%, FieldLong%):"XDBASSIGNFIELDLNG_Z"
  80. xdbAssignFieldSNG(dbHandle%, FieldName$, FieldNumber%, FieldSingle#):"XDBASSIGNFIELDSNG_Z"
  81. ;xdbAssignFieldDBL(dbHandle%, FieldName$, FieldNumber%, FieldDouble#):"XDBASSIGNFIELDDBL_Z"
  82.  
  83. ; ----------------------------------------------------------------------------------------------------
  84. ; DATABASE ROUTINES - Retrieving Field Values
  85. ; ----------------------------------------------------------------------------------------------------
  86. xdbFieldValue$(DBFhandle%, FieldName$, FieldCode%):"XDBFIELDVALUE_Z"
  87. xdbFieldValueINT%(DBFhandle%, FieldName$, FieldCode%):"XDBFIELDVALUEINT_Z"
  88. xdbFieldValueLNG%(DBFhandle%, FieldName$, FieldCode%):"XDBFIELDVALUELNG_Z"
  89. xdbFieldValueSNG#(DBFhandle%, FieldName$, FieldCode%):"XDBFIELDVALUESNG_Z"
  90. ;xdbFieldValueDBL_Z#(DBFhandle%, FieldName$, FieldCode%):"XDBFIELDVALUEDBL_Z" )
  91. xdbFieldPadding(DBFhandle%, TrueFalse%):"XDBFIELDPADDING_Z"
  92.  
  93. ; ----------------------------------------------------------------------------------------------------
  94. ; INDEX ROUTINES - Creation/Opening/Closing
  95. ; ----------------------------------------------------------------------------------------------------
  96. xdbCreateIndex(iFilename$, dbHandle%, IndexExpression$, Duplicates%):"XDBCREATEINDEX_Z"
  97. xdbOpenIndex%(iFilename$, dbHandle%):"XDBOPENINDEX_Z"
  98. xdbCloseIndex(DBFhandle%, idxHandle%):"XDBCLOSEINDEX_Z"
  99. xdbReindex(DBFhandle%, idxHandle%, ContinueOrError%):"XDBREINDEX_Z"
  100. xdbReindexAll(DBFhandle%, ContinueOrError%):"XDBREINDEXALL_Z"  
  101. xdbSeek%(DBFhandle%, idxHandle%, LookForKey$):"XDBSEEK_Z"
  102. xdbSeekNext%(dbHandle%, idxHandle%, LookForKey$):"XDBSEEKNEXT_Z"
  103. xdbSeekPartial%(dbHandle%, idxHandle%, LookForKey$):"XDBSEEKPARTIAL_Z"
  104. xdbSeekPartialNext%(dbHandle%, idxHandle%, LookForKey$):"XDBSEEKPARTIALNEXT_Z"
  105. xdbSetCallback(hWnd%):"XDBSETCALLBACK_Z"
  106.  
  107. ; ----------------------------------------------------------------------------------------------------
  108. ; INDEX ROUTINES - Index information
  109. ; ----------------------------------------------------------------------------------------------------
  110. xdbKeyLength%(DBFhandle%, idxHandle%):"XDBKEYLENGTH_Z"
  111. xdbKeyCount%(DBFhandle%, idxHandle%):"XDBKEYCOUNT_Z"
  112. xdbKeyUnique%(DBFhandle%, idxHandle%):"XDBKEYUNIQUE_Z"
  113. xdbKeyExpression%(DBFhandle%, idxHandle%):"XDBKEYEXPRESSION_Z"
  114. xdbMKL(LongValue%):"XDBMKL_Z"
  115. xdbMKI(IntegerValue%):"XDBMKI_Z"
  116.  
  117. ; ----------------------------------------------------------------------------------------------------
  118. ; QUERY ROUTINES
  119. ; ----------------------------------------------------------------------------------------------------
  120. xdbCreateQuery%(DBFhandle%):"XDBCREATEQUERY_Z"
  121. xdbQueryCondition(QueryHandle%, JoinPhrase%, FieldName$, Equality%, vParameter1$, vParameter2$):"XDBQUERYCONDITION_Z"
  122. xdbQuerySort(QueryHandle%, FieldName$, SortDirection%):"XDBQUERYSORT_Z"  
  123. xdbQueryExecute(QueryHandle%):"XDBQUERYEXECUTE_Z"
  124. xdbQuerySUM_Z#(QueryHandle%, FieldName$):"XDBQUERYSUM_Z"
  125. xdbQueryMIN_Z#(QueryHandle%, FieldName$):"XDBQUERYMIN_Z"
  126. xdbQueryMAX_Z#(QueryHandle%, FieldName$):"XDBQUERYMAX_Z"
  127. xdbQueryAVG_Z#(QueryHandle%, FieldName$):"XDBQUERYAVG_Z"
  128. xdbQueryDistinct(QueryHandle%, DistinctFieldName$):"XDBQUERYDISTINCT_Z"
  129. xdbHtmlStripTag(QueryHandle%, TrueFalse%):"XDBHTMLSTRIPTAG_Z"  
  130. xdbDestroyQuery(QueryHandle%):"XDBDESTROYQUERY_Z"
  131. xdbQueryIndex%(QueryHandle%):"XDBQUERYINDEX_Z"
  132.  
  133. ; ----------------------------------------------------------------------------------------------------
  134. ; DATE ROUTINES  
  135. ; ----------------------------------------------------------------------------------------------------
  136. xdbDaysApart%(DateFrom$, DateTo$):"XDBDAYSAPART_Z"  
  137. xdbDaysInMonth%(Year%, Month%):"XDBDAYSINMONTH_Z"
  138. xdbAddDate(StartDate$, Days%):"XDBADDDATE_Z"  
  139. xdbNameOfDay%(DateCheck$):"XDBNAMEOFDAY_Z"  
  140. xdbTodaysDate%():"XDBTODAYSDATE_Z"  
  141. xdbValidDate%(DateCheck$):"XDBVALIDDATE_Z"  
  142. xdbDateToJulian%(DateString$):"XDBDATETOJULIAN_Z"  
  143. xdbJulianToDate%(JulianNumber%):"XDBJULIANTODATE_Z"
  144. CTOD%(PBDate$):"CTOD_Z"  
  145. DTOS%(xDate$):"DTOS_Z"
  146.  
  147. ; ----------------------------------------------------------------------------------------------------
  148. ; MISCELLANEOUS ROUTINES
  149. ; ----------------------------------------------------------------------------------------------------
  150. xdbResetError():"XDBRESETERROR_Z"
  151. xdbError%():"XDBERROR_Z"
  152. xdbVersion%():"XDBVERSION_Z"  
  153. xdbRegisteredTo%():"XDBREGISTEREDTO_Z"  
  154. xdbDebugMode(UserMode%):"XDBDEBUGMODE_Z"
  155. xdbAppPath%():"XDBAPPPATH_Z"
  156. xdbActivate(ActivateNumber%):"XDBACTIVATE_Z"
  157. xdbFreeDLL():"XDBFREEDLL_Z"  
  158. xdbIsEncrypted%(DBFhandle%):"XDBISENCRYPTED_Z"
  159. xdbEncryptionMethod%(DBFhandle%):"XDBENCRYPTIONMETHOD_Z"  
  160. xdbTempFileName%():"XDBTEMPFILENAME_Z"


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal