Do you have an example for this?
Can this be done only with executable or also with other files?
Although this is kind of off topic in this topic.... because it's about SQL database...
<<off-topic>>You can load everything from resource. Directly from resource or storing it to a temporary file first.
For images and other files it is really easy. You can just store it in a resource and use Component.LoadFromResource.
For Fonts it becomes a bit trickier because those need to be registered in Windows but they too can be loaded directly from resource without temporary file. I have an example here somewhere on the forum.
For DLL and executables it becomes even more trickier because then you would need to simulate the loading process of the DLL/executable.
The BTMemoryModule code does this but works only in 32 bit for now.
But for your idea... you can just create a file myimages.rc.
myimage RCDATA "myimage.jpg"(png can be PNG and bmp can be BITMAP, but jpg needs to be RCDATA)
Include it in your .pp/.pas source with
{$R myimage.rc}
//...
Image1.Picture.Jpeg.LoadFromResourceName(HInstance, 'myimage');
Now, when compiling, the recource will be build and included in your executable and you can load it like above with LoadFromResourceName.
<<//off-topic>>If you have other questions about this you might want to open your own topic for it
