Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binary or blob data type
Message
 
 
To
09/04/2019 15:32:52
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01668007
Message ID:
01668025
Views:
32
>>A couple of questions, to confirm my understanding.
>>
>>1. If I check the LEN() of the VARBINARY field, it returns the number of bytes, not the number of characters this value would be cast to. Correct?
>>Example:
>>
>>cTest = "1234567890"
>>bTest = cast( cTest as varbinary(250))
>>? len(bTest)      && shows 10 = number of bytes.
>>? bTest             && much longer than 10.  That is, this is the actual length of the value in the field
>>
>It's still 10 bytes, i.e. 10 characters. It's just prefixed with 0h and then spelled out in hex, because it's treated as binary. So you got ten characters displayed as 20 hex digits plus two character prefix, i.e. 22. But it's still 10 long.

I understand. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform