Ask Your Question

store mp3 in base [closed]

asked 2017-03-31 07:07:41 +0100

gandalf1000 gravatar image

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

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-28 21:13:07.544188

2 Answers

Sort by » oldest newest most voted

answered 2017-03-31 16:51:31 +0100

updated 2017-03-31 16:54:35 +0100

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 ✔ (here on the left)

edit flag offensive delete link more

answered 2017-03-31 20:07:14 +0100

Ratslinger gravatar image

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

edit flag offensive delete link more


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

Ratslinger gravatar imageRatslinger ( 2017-03-31 20:24:02 +0100 )edit

Question Tools

1 follower


Asked: 2017-03-31 07:07:41 +0100

Seen: 126 times

Last updated: Mar 31 '17