Storing media feilds in Calcs

Hi,
I have the following code in a media field, that works fine when unstored, but refuses to store the data to my mysql database if changed to stored,
does servoy have a problem storing media feilds from calculations??

Servoy Developer
Version 3.5.6-build 519
Java version 10.0-b23 (Windows XP)

switch(wip_week_tag_show)
{
	case 1:
		return 'media:///tag_grey.png';
	case 2:
		return 'media:///tag_red.png;
        case 3:
		return 'media:///tag_green.png';
	
	default:
		return 'media:///tag_grey.png';
}

That should work nicely, do you call saveData() to save to the DB somewhere?

what do you mean with:

does servoy have a problem storing media feilds from calculations?

what do you expect to be stored??

If you return:

return 'media:///tag_grey.png';

then the string is stored… not the image your self.
So what type is the column in the database? it should be string. not media.

Hi Johan,

Yes I worked that out :oops: , the column was set as a blob type, thanks for the reply.