home *** CD-ROM | disk | FTP | other *** search
- Form1
- DBase Demo
- Form1,
- Label1
- Output
- Picture1
- Courier
- Command1
- &Create
- Command2
- &Read
- Command3
- &Quit
- Command1_Click
- result
- getaddr
- db3file
- fieldar
- fieldarr
- form2
- loadp
- picture1
- tempstr
- peekbyt*
- Command3_Clickn
- pokebyt
- pokebytoff/
- peekbytoffL
- filedarr
- CreateDbfb
- lresult
- Iresult
- filename
- nameadd
- Data|
- fielddata
- CloseDbf
- gataddr
- RTim8
- WriteDbErrorW
- asciib
- length
- indicator
- offset(
- start
- which
- precedes;
- PASCAL
- strings#
- databuff
- RecPointer
- actual
- MoveBytes
- AppendDbf
- declared
- Command2_Click
- dbfrecord
- OpenDBf
- GetDBfRecord<
- WriteDbRec
- GetDataPointer1
- dbrec
- subroutine.
- defined
- @ GetRecord
- RecNum{
- @ GetDBInfo
- DateOfUpdate
- NumRecs
- pointer
- record
- StrToLong"
- AStrToLongc
- StrToLongtrToLong
- aStrToLong
- StrToLongtring
- RecLen
- NumFields
- GetDBRecord
- StrToInt
- repointer
- OpenDB
- Command1_Click
- db3file, recpointer, and databuff
- are declared in global.bas
- because they need to be accessed by other
- functions
- Field definition buffer at 16 bytes per field
- Maximum of 16 fieldss
- Each field name must be preceeded by length Bytee
- because the DLL expects PASCAL stringss
- Field names must be upper case for DBase compatabilityy
- Second field is Type allowable types aree
- C Character
- N Numeric
- L Logical
- M Memo (not implemented))
- D Date
- Must be length 8 and stored as
- ymmddm
- Third field is Length as a char
- Fourth field is Decimals for numeric fields
- Fifth field is optional and representss
- an integer offset from the start
- of the record beginning with 1e
- CUSTOMER is a Char field of 20 bytes with
- no decimals and offset of 1
- CUSTOMER
- DATE is a Date field length 8
- AMOUNT is a Numeric field length 16
- defaults to no decimals
- AMOUNT
- Insert length byte before filenamee
- as DLL expects PASCAL string
- "db3test.dbf" is 11 bytes long hencee
- chr$(11)+"db3test.dbf"t
- db3test.dbf"
- Create Status: "s
- Get record buffer address held in db3file
- structure at offset 251
- Subroutine defined in general..
- recpointer is declared in Global.base
- Append recordss
- Uses MoveBytes from assembler DLL vbaddr.dlll
- Each record is 44 bytes
- 012345678901234567890123456789012345678901234
- ALPHA 19910901-100 "
- BETA 199109022000 "
- GAMMA 199109033000 "
- Close file
- Close status: s
- Command3_Click
- Command2_Click
- Read the database created by the create buttonn
- The Chr$(12) is the legth of file name and is
- required because the DLL expects PASCAL strings
- db3test.dbf"
- Opens the file and gets the database info intoo
- global variabless
- DateOfUpdate String*8
- NumRecs
- Longt
- Reclen
- Integert
- NumFields
- Integer
- RecPointer Long pointer to DLL data bufferr
- Cannot open db3test.dbf"u
- Recordt
- Error"u
- GetRecord
- Gets one record from an open DBase file
- GetDBInfo
- Extract the file details to GLOBAL.BAS variabless
- Requires DBase file structure of an open file
- DO NOT call before OpenDBfu
- StrToLong
- StrToInt
- OpenDB
-