Ask Your Question
0

Can you insert a picture into a database field. If so how ?

asked 2015-11-10 18:52:49 +0100

Mark37421 gravatar image

updated 2016-03-14 15:33:36 +0100

Alex Kemp gravatar image

I'm new to this software and would like to know how to insert a picture into a database field.

Can this be done ? If so how ?

Version: 5.0.3.2 Build ID: e5f16313668ac592c1bfb310f4390624e3dbfb75 Locale: en-US (en_US) Libre office Database Window 10 PC

Thanks, Mark

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2015-11-12 05:09:46 +0100

JohnD gravatar image

Welcome to LibreOffice and this forum.

In the table that you want to insert pictures - make a field with a field type of Image [LONGVARBINARY].

In your form or report, insert the Image field and size it however you desire.

You enter pictures into this field by right clicking on the form field and selecting Insert Image from . . .

It then opens the file file browser for you to find and select the desired image file.

Once the field is populated you get an additional option to Remove Image, if desired.

Keep in mind that large image files will make a large database table that may slow things down a bit. Try to keep the picture resolution as low as possible (smaller file sizes).

edit flag offensive delete link more

Comments

Thanks for this. I was trying to insert directly into the table, but it has to be through a form.

Pansmanser gravatar imagePansmanser ( 2018-10-09 12:21:17 +0100 )edit
0

answered 2015-11-11 16:41:04 +0100

LKeithJordan gravatar image

I don't have access to LO Data right now, so I'm writing "off the top of my head" from fairly extensive experience with MS-Access (which is similar).

You don't actually "insert a picture into a database field." Instead, you enter the link to the picture file (png, jpg, etc.) into the data table field. You then use a form or report, add a control for the picture, and reference the data table field as the underlying source for the control.

Please click the check mark next to my response if you believe it best answers your question.

edit flag offensive delete link more

Comments

I don't think LO (at least with Firebird) gives the option of linking to a picture. The increase in the file size indicates that the image is inserted.

Pansmanser gravatar imagePansmanser ( 2018-10-09 12:20:25 +0100 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2015-11-10 18:52:49 +0100

Seen: 1,050 times

Last updated: Mar 14 '16