Double in blob to string?


Active Member
Licensed User

A double is stored in a blob in a SQLite data base, say starting on position 16. I know the column, say 4. I didnt do that, for me it is a given fact. I need to 'read' this double from the blob and to convert it to a string, showing the value, say 1.234567. Can somebody help me?



Licensed User
Get the blob as a byte array, data() = DataReader.GetBytes(column), then use my BytesConverter library to convert the value you want. Watch out for possible little/bigendian problems depending upon the source of the data for the blob.

Note that, as documented in the help, the library converts one or more bytes of an array to a fundamental data type. Then Basic4ppc, which knows about all the fundamental types, converts that data on input into its own internal representation which is in fact a string.