Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3833

Convert UUID to BINARY(16) for storage

$
0
0

(NOT a database question, so please hang on)

I’m having some cross-dbase compatibility issues with built-in dbase functions for generating and storing a UUID. So I want to create my own UUID, convert it to BINARY(16), and insert it accordingly, e.g.,

some_id BINARY(16) PRIMARY KEY

With a UUID String in Xojo, (e.g., “EF2D3D66-3A95-4247-A3C2-EA2CBC99784B”) what is the easiest way to convert to BINARY(16) for storage in database?

---- in case you want to know the dbase incompatibility —

MySQL supports ‘UUID_TO_BIN’ for conversion during insert, but MariaDB doesn’t support this. Thus I need to create the UUID, convert it to BINARY(16), prior to insert.

5 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3833

Trending Articles