Can't Add Picture To Records(Base)

Right off the bat I am using 7.6.2.1 on Windows.

I’ve been working on getting a db setup for a project at work and have been using the Frugal Computer Guy’s videos to assist me a bit. Realizing that we’ve probably got vastly different versions of the software of course.

Anyway. I’ve got a form setup to add/edit records. I’m trying to get it setup so I can attach a picture to said records. He’s using “Image Control” to do this. I setup everything the same way he did. He can right click on the form and add an image. When I right click, nothing happens. At all.

I can embed an imagine anywhere using the image button, but I need to be able to add a picture to each record as needed.

Here’s the video I’m referring to at about the 3:00 minute mark.
LibreOffice Base (15) Embedding a Picture - YouTube

Any ideas as to why I can’t do it the same way he is? And/or is there a better way to go about doing this? Our forms are basically the same, I just have different information as mine isn’t for demonstration purposes.

Thanks in advance.

2 Hints:

  1. You need an image control to insert pictures into a table.

  2. You could connect this control to a field in the table, which is defined for images (BLOB or BINARY). You could only connect this control to a field, which only saves text. So the image won’t be saved in the database - only the path will be saved.

Be careful by saving images in the database. Images, which are saved in the database, should be very small. I would prefer to put all images for the database into a folder and only connect to the images by the path. The preview in the image control will work for this solution also.

Maybe you prefer this way How to insert a link to an odb database to display an image

I have image control as I stated before. It does nothing as I stated before. I can’t interact with it, that’s the issue as I stated before.

I followed the steps in the above video, as I stated before, and what it does for him it does not do for me.

I insert the image control, it’s tied to my data field where these images will be stored in the table, but I can’t do anything to put the image into the image control field. Left click, right click, nothing does anything.

Yes, I am aware it would be better to do it via path… that’s not an option in this scenario at the time. I need to get the thing built and working and then I’ll adjust from there in the future. But right now, it’s not working at all.

I don’t need to link to an image, I need to add an image.

@jparton Please add a little example database here without personal data. So we could see what is going wrong.

I’m not going to make a whole new DB for this, I don’t need to as there’s no personal data in the thing.

I can’t upload it here because in this day of multi terabyte harddrives I can’t upload more than 4 mb here, which is ridiculous.

https://file.io/2AJhOZLC9Vrp So there’s the whole thing.

In Forms > enterrecords there is a box in the lower center of the form. That’s my image control. It needs to be linked to the “Marker” field in the table. Right now that field is blank. I have the images I need on my PC, I need to add them to said field via the form. That’s how I need this to work.

As I said previously, I can’t interaction with the image control field on the form at all.

@jparton : Couldn’t download the file through that link. Seems to be deleted. If the file is 4 MB, it is big for a database with more than forms and “normal” content.

So we have to see if we could get the reason in screenshots. Please upload a screenshot

  • of the table, opened for editing (not input data), which shows the field for the image and the properties for this field.
  • of the form control which should contact to the field of the table. “Properties” and “Data” will be needed.
    AddPicture.odb (199.7 KB)

It’s really not that big. I’ve seen much larger for much less information.

Still ridiculous that there’s such a restrictive file size for uploading here.

You’ll get your screen shots, assuming they aren’t too big for me to upload… or you could refer to the video as what he shows is exactly what I show minus the version differences.

“Properties” isn’t a valid option. Do you want Control Properties or Form Properties? Or both? Or do you need only the data from each. Specify please.

@jparton : You have send a tableview, opened for input data. Might be “Marker” is you field for saving images. Don’t know, because I’m missing a screenshot of the form control-properties.

Please test with the added database I have uploaded on Friday. No problem here to load an image in a database.

I sent what you asked for. If you needed something else, you need to ask for it. You asked for things that don’t exist so I didn’t send anything else. I’ll add the picture from control properties.

And yes, marker is the field that’s supposed to be the image.

Your works fine. That’s great. I’m happy for you.

Why doesn’t mine. That’s the issue here.

What happens if you click on the control with left mousebutton (doubleclick)?

Nobody can tell from screenshots. You should abstain from embedded pictures anyway. Rather sooner than later it will crash on you with a likely loss of all your data. IMHO, you should even abstain from embedded databases except for educational purpose, drafts and demos.

Nothing happens when I click anything.

Thanks for the help, Champ.

Like a screen door on a submarine.

Could you input any other data in the form and save the data?

When having a look at the fist screenshot there is a field ID, but there seem to be no values inside. If I delete the ID (for the automatic primary key) in my example there will also nothing happen when clicking on the image control.

I noticed something odd in your screenshot of the Data Table View. The ID field appears to be blank. If that is indeed true that would explain the inability to add an image to your form.

ID is generally the Primary Key for a relational database table, typically a unique integer value. Without a Primary Key the underlying database engine interprets the table as read only, explaining why you get nothing when you right or left click on the image control.

Hopefully, you understood the warnings in the video tutorial you watched. In his demonstration he added 15 photos (3 at a time and a backup each time) that resulted in an .odb file of over 4MB. That is quite large for an Embeded Database where everything (Tables, Queries, Forms, Reports and a copy of the database engine) is stored in a Zip archive. Your screenshot indicates that you have a minimum of 95 records in your table and if each has a 1920X1080 image attached the resulting .odb file will be huge and could takes minutes to load and save.

It’s like… ya’ll just can’t help yourselves.

I don’t CARE about the size of the databse. I don’t CARE about any of that. None of that is important right now.

I need to know WHY it isn’t working. Ya’ll are so busy trying to tell me how to do something that isn’t what I want, or telling my why you wouldn’t do what I’m asking for to even bother to try and troubleshoot the actual problem.

Donald may be onto something here and I’m going to look into it, but so far not a single person other than Donald has even attempted to address the issue.

1 Like

Can you edit some text, date, number in the same table (directly in table view or in the form)?
If not, the most likely reason is the missing primary key.