Store mp3 in base

I want to create a table with these fields:
word varchar(30)
definition varchar(60)
sound mp3 file
image gif or png file

Ciao, I think you can store a link to mp3 files in a database field and a link to gif/png files in another database field.

If you export your database, you must export also mp3/gif/png files.

If my answer helped you, vote it with :heavy_check_mark: (here on the left)

I’m not sure to what end you would want to store mp3 in a database since you can create a reference in any document. My only thought is to be able to play the mp3 you have on file. If so, read on.

To actually store an image or mp3 file in an embedded database is not advisable. There are problems using the longvariable field when stored this way and will cause DB corruption in less than 10 records. This is usually not a problem with split or external DB’s. The best way to create is (as mentions) through links to the images and/or mp3’s.

To actually play the mp3 from within Base, you need a macro. The macro is started from a pushbutton and plays the linked mp3 file. A sample is attached to demonstrate this. There are no records in the table since these are external to the .obd and rely on actual location of the image or mp3. This has been tested and provides minimal functionality (start & stop mp3)
There are other functions which can be added through more code. Here are some references for the how each element is generated:

Linking an Image - click here

Play mp3 macro - click here

Other functions for player - click here

Sample Base file: ImageAndMP3Play.odb

BTW - only tested this using Linux Mint 18 & LO v5.3.1.2