Bt_PadStrings() Function
<< Click to Display Table of Contents >>
Bt_PadStrings() Function
|
|
Purpose
Pad string fields with spaces when reading/writing
Prototype
FUNCTION Bt_PadStrings ( lSet ) AS LOGIC
Description
This setting allows you to influence the way VO2Btrieve handles fields of type string. By default VO2Btrieve will pad fields to the length defined in the field structure. You can switch this behaviour off if you want to by calling this function with an argumnt of FALSE
Example(s)
// In this example fields of type string will not be padded.
// We are using a Server with a Lastname field of length 30
// And we are writing 10 characters
// Whatever was in the server in positions 11 to 30 of the field
// will not be overwritten
Bt_PadStrings(TRUE)
? oServer:Fieldget(#LastName) // Returns "van der Hulst "
Bt_PadStrings(FALSE)
? oServer:Fieldget(#LastName) // Returns "van der Hulst"
oServer:FieldPut(#LastName,"X")
? oServer:Fieldget(#LastName) // Returns "Xan der Hulst"