Ask Your Question
1

How to insert a link to an odb database to display an image

asked 2016-08-31 15:43:27 +0100

Laika gravatar image

updated 2016-08-31 22:04:07 +0100

Kruno gravatar image

I'm trying to create hyperlinks into a database I'm creating of plants and herbs (odb). But it doesn't work.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
3

answered 2016-08-31 19:05:39 +0100

Ratslinger gravatar image

Here is a minimal setup.

First the table. Two fields: an ID for key (AutoValue = Yes) and a Text[VARCHAR] of say 100 characters to hold the location.

Next the form. Form properties set to the created table. Two controls on the form: Image Control pointing to the text field in the table and a Navigation Bar to move through the table items.

To use, open the form. With no records in the table you can add a new link by a right mouse click on the image control, then left click on the displayed Insert image from... and select the location of the wanted image. Go to Next Record and the previous link is inserted into the table.

edit flag offensive delete link more
2

answered 2016-08-31 21:13:14 +0100

updated 2016-09-01 06:52:53 +0100

I tried Ratslinger's answer. It works very well. Here a example with flags:

C:\fakepath\Flags.odb

C:\fakepath\Argentina.png

C:\fakepath\Australia.png

C:\fakepath\Brazil.png

edit flag offensive delete link more

Comments

@charlie.it thanks for the sample. Works fine if .png samples and saved paths match. Even without that, it allows for new entries to be made.

Ratslinger gravatar imageRatslinger ( 2016-08-31 21:32:31 +0100 )edit
0

answered 2019-09-28 10:35:47 +0100

fbertoldi gravatar image

updated 2019-09-28 10:36:34 +0100

Today I followed another way: link rather than embed the images, so that the odb file can remain of small size.
1. in edit view add a text box in your form and
2. convert it (replace with) to a image control
3. in normal view double click on the new box and select the image, which will not embedded, but linked.

If you use a mysql database you can set the field as varchar (at least 150 char) and insert the location, such as http://localhost/your-path/yourfile.jpg

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-08-31 15:43:27 +0100

Seen: 1,146 times

Last updated: Sep 28 '19