Hi Cujos,
Had a quick look at your message.
In answer to your original question -
In my application i rename files on disc to a unique filename and then i want to load it in to my "DBImages" object.
When i do this the image displays correctly, but... When i save the form and open it up again, the image is gone..
This is because when you use the linkfile option, it stores the path+file name in a field (in your example - main_table.bild_filename). If you then rename the file as you are doing, you need to update main_table.bild_filename at the same time otherwise MVD can't find the image.
If you didn't need to rename the file, it would be very simple, using the 'copyto' object property of dbimage1.
But if it is a requirement to choose an image from the source folder, copy the image to another location, rename the image and then delete the image from the souce folder, I would perhaps do it like this (see attached); obviously, you will need to change a couple of things in the script where I have hard-coding pathnames (I was in a hurry!) but the approach should work for you.
Hopefully, it will give you a few ideas,
Derek.