C# Inserting Image in XML Database

I need to be able to change an image in a datareport at runtime.
To do so I will need to put the image in an XML file and call this as a subreport database with one row (containing the image) when the report is run.
How does one place an image (JPG) into a database XML: file ?
Any suggestions
Thanks
LVL 1
LinkingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

singhhomeCommented:
If u want to write a image in xml format, u can use System.Resources.ResxResourceWriter (in System.Windows.Forms.dll)

Image img = Image.FromFile(Utilities.ExecutingDir + Path.DirectorySeparatorChar +  "image.jpg");            

            using (ResXResourceWriter writer = new ResXResourceWriter(Utilities.ExecutingDir + Path.DirectorySeparatorChar + "Resource.resx"))
            {
                writer.AddResource("myimage", img);
                writer.Close();
            }

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LordWabbitCommented:
or you could mime encode the image and add a xml data node with the image, but i am not sure if this is what you want.  does the xml column in the database have a schema?  does the schema already cater for an image and you just need to change the image.  do you need to save the modified xml back into the database.  more info need more info....
LinkingAuthor Commented:
Thanks very much
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.