home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / CALLBUTN / BTRV.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-03-14  |  9.7 KB  |  356 lines

  1. Sample program using CallBtrv()
  2. Form1%
  3. -    Command18
  4. (    Command17
  5. Get >
  6. '    Command16
  7. Get <
  8. Command4
  9. &    Command15
  10. Get >=
  11. Text10
  12. ,    Keylength
  13. Command3
  14. Close
  15. %    Command14
  16. Get <=
  17. Command9
  18. Delete
  19. $    Command13
  20. Get =
  21. Text9
  22. Command8
  23. Insert
  24. #    Command12
  25. GetPrev
  26. Text8
  27. Text7
  28. Command7
  29. Update
  30. Command6
  31. GetNext
  32. Text6
  33. Text5
  34. .    Command19
  35. Create
  36. "    Command11
  37. Get Last
  38. Text4
  39. Text3
  40. Command2
  41. Command5
  42.     Get First
  43. Text2
  44. Text1
  45. Command1
  46.     Command10
  47. Label2
  48. Label1
  49. RetCode
  50. Label8
  51. Key #
  52. Label7
  53. File #
  54. Label6
  55. Filename
  56. Label5
  57. Keylen
  58. Label4
  59. Keyval
  60. Label3
  61. Command1_Click
  62. BStatus
  63.     WBtrvInit
  64. Label2
  65. Command4_Click
  66.     WBtrvStop
  67. BStatt
  68. Form_Click
  69. MaxFile8
  70. Caption
  71. @    Form_Load
  72. FileName~
  73. Path%
  74. Command2_Clickb
  75. Btrv7
  76. Command3_Click0
  77. Command5_Click
  78. ChartRec
  79. BtrvBufv
  80. ShowAcctG
  81. Label3!
  82. Label4
  83. GlAcctB
  84. Label5
  85. GlName
  86. Label6#
  87. GlType
  88. Label7}
  89. GlParen
  90. Label8
  91. GlMaster
  92. Label9K
  93. Label10
  94. GlSort
  95. Label11
  96. GlNoOfHist
  97.     GlBalanceP
  98. Command6_Click
  99. Form1+
  100. Command7_Click4
  101. Text1
  102. Text2
  103. Text3
  104. Textg4
  105. Text5
  106. Text4
  107. Text6
  108. Text7>
  109. Text8?
  110. Text9
  111. Command8_Click
  112. Command9_ClickC
  113. Command10_Click^
  114. KeyVal
  115.     MultiUser
  116. LockType\
  117. UpdateVars)
  118. KeyLen
  119. Command11_Clicki
  120. Command12_Click|
  121. Command13_Click
  122. Command14_Click
  123. Command15_Click
  124. Command16_Click
  125. Command17_Clickw    
  126.     KeyLength
  127. CallBtrv2
  128. FileModeb
  129.     OM_NORMALC
  130. B_USE
  131. B_GETFIRST
  132.     B_GETLASTd
  133.     B_GETNEXT
  134.     B_GETPREVY
  135. B_GETEQN
  136. B_GETLEy
  137. B_GETGEu
  138. G_GETLT
  139. B_GETGT
  140. B_OPEN
  141. B_UPDATE
  142. B_INSERT
  143. B_DELETE
  144. B_CLOSE
  145.     GET_FIRST
  146. GET_LAST
  147. GET_NEXTQ
  148. GET_PREV9
  149. GET_EQ
  150. GET_GT
  151. GET_GE
  152. GET_LT
  153. GET_LEP
  154. B_CREATEn
  155. B_STAT-
  156. B_SETDIR
  157. B_GETDIRF
  158.     B_BEGTRANS
  159.     B_ENDTRAN,
  160. B_ABORTTRAN"
  161. B_GETPOS}
  162. B_GETDIRECT
  163. B_STEPNEXT5    
  164. B_STOP
  165. B_UNLOCK
  166. B_RESET
  167. B_STEPFIRST
  168. B_STEPLAST
  169. B_STEPPREV
  170.     B_KEYONLY
  171. B_GET_FIRST
  172. BTRV_FILESPEC~
  173. BTRV_KEYSPEC1
  174. BTRV_KEYSPEC6
  175.     ParenCtrl
  176. Master
  177. LastDay
  178.     LineColor
  179. InitBTRV
  180. BE_OK
  181. GlFile
  182. FileNo
  183. OpenBTRVfile
  184. hFile
  185.     OM_NORNALR    
  186. BE_FILENOTFOUND
  187. Length{
  188.     GlInfoLen
  189. PageSizei
  190. nbIndex
  191.     FileFlags&
  192. KeyPos!
  193. KeyFlagsA    
  194.     KF_STRING
  195. KF_MODIFIABLE
  196. ExtKeyType
  197. KeyNull
  198. CreateBTRVfile
  199.     GlAcctLenG
  200. Alloc
  201. KeyPos1
  202. KeyLength1
  203.     KeyFlags1W
  204. ExtKeyType16
  205. KeyNull1
  206. KeyPos2
  207. KeyLength2
  208.     KeyFlags2
  209. KF_SEGMENTl    
  210. ExtKeyType2n
  211. KeyNull2,
  212. KeyPos3:
  213. KeyLength3V
  214.     KeyFlags3
  215. ExtKeyType3
  216. KeyNull3m
  217. KeyPos4{
  218. KeyLength4
  219.     KeyFlags4
  220. ExtKeyType4
  221. KeyNull4
  222. KeyPos5
  223. KeyLength5
  224.     KeyFlags5
  225. KF_DUPLICATE[    
  226. ExtKeyType5
  227. KeyNull5
  228. KeyPos6
  229. KeyLength6)    
  230.     KeyFlags6
  231. ExtKeyType6&
  232. KeyNull6e
  233. BatchLen
  234. KF_DESCENDING
  235. GJLen
  236. FF_VAR_LENGTH
  237. DeptLenc
  238. fsFileFlags=
  239. ExitBTRVI
  240. KeyNo
  241. Command18_Click
  242. Command19_Click
  243. Index0
  244. KEY_1SEG
  245. Specs
  246. KEY_6SEG
  247. RecLen
  248. PgSize
  249.     NoOfIndexR
  250. NotUsed&
  251. ResWrd
  252. KeyLen1
  253. NotUsed1y
  254. Ext_Nul1
  255. ResWrd1
  256. KeyLen2
  257. NotUsed2
  258. Ext_Nul2T
  259. ResWrd2
  260. KeyLen3
  261. NotUsed3
  262. Ext_Nul3
  263. ResWrd3
  264. KeyLen4
  265. NotUsed4
  266. Ext_Nul4
  267. ResWrd4s
  268. KeyLen5
  269. NotUsed5^
  270. Ext_Nul5
  271. ResWrd5
  272. KeyLen6
  273. NotUsed6
  274. Ext_Nul6
  275. ResWrd6
  276. buffer
  277. FNo_Change
  278. FNo_LostFocus
  279. INo_Change
  280. INo_LostFocus
  281. Text10
  282. OM_ACCELERATED
  283. OM_READONLY
  284.     OM_VERIFY
  285. OM_EXCLUSIVE
  286. Switches
  287. Command1_Click
  288.  set Btrieve switchesd
  289. /m:48 /p:2048 /b:16 /f:20 /l:20 /n:12
  290.  initialize Btrievee
  291.  show Btrieve return code 
  292. Command10_Click
  293.  this returns the number of records in the filed
  294. Command11_Click
  295. Command12_Click
  296. Command13_Click
  297. Command14_Click
  298. Command15_Click
  299. Command16_Click
  300. Command17_Click
  301. Command18_Click
  302. Command19_Click
  303.  disable this command so we don't delete the sample file
  304.  given with programh
  305.  this sample code is given to show how to set up a buffer to enableN
  306.  a program to create a fileo
  307.  dimension Specs for key characteristics for 6 segmentso
  308.  the file number
  309.  set KeyNo to 0 to create a file over an existing file
  310.  set KeyNo to -1 if you do not want Btrieve to create a new file
  311.  over an existing file - Btrieve will return an error code. 
  312.  assign file characteristics
  313.  length of record 
  314.  page size
  315.  number of keyss
  316.  file specifications
  317.  space to preallocates
  318.  key specificationst
  319.  position of first segment
  320.  length of first segment
  321.  key characteristics
  322.  position of second segment ...r
  323.  assign file characteristics to Btrieve buffer
  324.  create the file
  325. Command2_Click
  326.  open a Btrieve file
  327.  the key number contains how the file is openedi
  328.  OM_NORNAL = read/write using pre-imagingo
  329.  OM_ACCELERATED = accelerated access
  330.  OM_READONLY = read only
  331.  OM_VERIFY = verifies data is correct on all writesp
  332.  OM_EXCLUSIVE = exclusive mode
  333. Command3_Click
  334. Command4_Click
  335.  stop Btrievep
  336.  usually you would put this in a Form_Unload event
  337.  be sure to close all files firsth
  338. Command5_Click
  339. Command6_Click
  340. Command7_Click
  341. Command8_Click
  342. Command9_Click
  343. FNo_LostFocus
  344. Form_Load
  345.  change the path to your directory
  346. m:\vb\btrv\
  347. GLACCT.BTR
  348.  integer containing the length of each key
  349.  in the form KeyLen(FileNo,KeyNo) 
  350.  default key numberk
  351.  default file number
  352. INo_LostFocus
  353. ShowAcct
  354. ##,###,##0.00
  355. UpdateVars
  356.