LO Base: Set value of LONGVARBINARY column from file through SQL?

Dear LO Base gurus,

I am trying to create a simple database with some tables and forms. Setting it up wasn’t difficult but I am stuck where I am trying to load some existing data into my tables.

So is there a standard way in Base to insert or update a LONGVARBINARY column from a binary file through an SQL/DML query?

Ideally what I am after would be some equivalent of this syntax in MySQL:

insert into person (id, photo) values (1, load_file('photo.jpg'));


update person set photo = load_file('photo.jpg') where id = 1;

or even

update person set photo = load_file('photo_'+id+'.jpg');

If there is no function corresponding to load_file() in Base I suppose I am going to have to use a macro. However I am reasonably well versed in databases but I am afraid I haven’t a clue on where to start with VBA programming. I would appreciate any pointers here.

Because of my googling so far I am aware that the common wisdom regarding pictures in Base tables is to link them by putting their filenames into text columns, not store them into blobs. However I have reasons for wanting to try this approach. The main one being that it frees the user of the responsibility of managing a folder full of pictures. So if I can give my user just a single .odb file that they can open and work with, that would avoid some potential headaches/mishaps.

Thank you.