Image not stored in database

Hi Guys,

When I try to create a new record containing a media field (bytea field in the PostgreSQL database) and I load an image into it using the SmartClient, the record is not saved. This applies to new tables I create, but also to the example_data.employee table which contains a photo field. Any suggestions? Thx.

My suggestion would be don’t store binary media in database fields, just store a link to a disk file, but I suspect you don’t want to do that :D

Hi Alan,

That’s right, thanks anyway. I’ve seen it work before so I am not sure what the problem could be. Bug?

It works for me in 6.1.2 with postgres. Have you checked the logs?

Hi Joas,

Nothing in the log… Something is wrong however because I cannot save changes at all anymore, even without a media field.

Hi Joas,

I’m storing my images as bytea, which comes across in Servoy as “media”, and I’m able to save them in the database.

Oh, I just see that your latest note says that you’re having trouble saving records at all, not just image-related.

Is it just saving to the table with the images that’s giving you a problem? Or doing saves anywhere? Isolating that might help you a bit (but you probably already know that :) )

Ron