Stuart McLachlan
stuart at lexacorp.com.pg
Sun Jun 4 06:17:41 CDT 2006
On 4 Jun 2006 at 12:10, Gustav Brock wrote: > Did you know that a Binary field type is available with a length of 510 > bytes? ... > > You might get the idea that it will hold strings of length beyond 255 chars > but no, it will not. They will be truncated, 255 is still the maximum. It Strings are store as Unicode and use two bytes each 510 bytes = 255 x 2 byte characters. > mostly looks like a fixed length "Tiny OLE Object" as it seems to hold a > fixed length byte array. So what's the purpose if this field type? Or how to > use it in a way not offered by other data types? Looks as though it would be useful to store a user-defined type in a single field. I'd guess that you could use StrConv(strMyString,vbFromUnicode ) and StrConv(strMyString,vbUnicode ) with a terminating Null to store up to 509 character strings in the field and still have ithem searchable/sortable - although it will probably only sort in ANSI order (case sensitive - all caps sorting before all lower case). You could also use it to store up to 4080 bit flags per record. :-) -- Stuart