Using image in Database

Using image in Database

Another of my "Newbie" questions...
I'm trying to create a database entity, to store employee information. In the informations, I'd like to include the picture of the employee.
I created the entity with the Id and the attribute "Binary Data" type for the picture. This entity is connected to another entity, where I stored some other informations.
My problem is how to include the image in that database field. As is in Help, I created the field in the form. However, the field is displayed as a square with the red X, and I see nowhere how can I upload the image.
Can anyone please tell me an example where this is used, or what am I missing?

Thank you
Dear Fernando:

The database Files/Images sample is not yet complete for publication in the extranet as an official sample. But, since you have that problem now, I have attached the uncomplete version of it to this post.

The highlights in the data model are:
- Create a Table with just the ID and the BinaryData field
- Create a Foreign key from your table (employee) to the file (photo) table

This allows you query only the employee table. NEVER EXECUTE A JOIN with the binary data table (Photo) because it may may cause severe performance issues. The only time you should get data from the photo table is to fetch one single record by ID.

When using the Image Widget you should change it to Type Database, place Photo on the source entity, the BinaryField name in the attribute and the ID of the image you want to show (the remote foreign key) in the ID property. The platform will do the rest.

Hope it helps