Bt_PadStrings() Function


<< Click to Display Table of Contents >>

Navigation:  System Settings >


Bt_PadStrings() Function


Previous pageReturn to chapter overviewNext page





Pad string fields with spaces when reading/writing







FUNCTION Bt_PadStrings ( lSet )  AS LOGIC







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







// 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


? oServer:Fieldget(#LastName)                // Returns "van der Hulst                 "


? oServer:Fieldget(#LastName)                // Returns "van der Hulst"


? oServer:Fieldget(#LastName)                // Returns "Xan der Hulst"