﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » Getting an error when setting an image</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 06:15:28 GMT</lastBuildDate><ttl>20</ttl><item><title>Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2710.aspx</link><description>&lt;FONT color=#111111&gt;Hi.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111111&gt;I'm trying to set an image field in a table, just as in the CRMSample's ProductMaintenance form. This is the company logo.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #bbddbb"&gt;Me&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT style="BACKGROUND-COLOR: #bbddbb"&gt;&lt;FONT color=#000000 size=2&gt;.Empresas.emp_logo = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;(loImage, System.Drawing.Bitmap)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111111&gt;Did it exactly as in the sample form.:D&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111111&gt;Surely, I'm missing something ... would you guys have a clue ?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111111&gt;TIA&lt;/FONT&gt;</description><pubDate>Mon, 11 Sep 2006 10:37:25 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2730.aspx</link><description>No problem :)</description><pubDate>Mon, 11 Sep 2006 10:37:25 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2729.aspx</link><description>Working now.&lt;/P&gt;&lt;P&gt;Thanks a lot Ben.</description><pubDate>Mon, 11 Sep 2006 09:14:10 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2728.aspx</link><description>You will need to add the reference to the project that contains the business object with the customized field.&amp;nbsp; Each project's references are independent of the other projects references, so yes, you will have to add one to the bo library as well (it it contains the business object with the customized field).</description><pubDate>Mon, 11 Sep 2006 08:46:10 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2727.aspx</link><description>I have a separete BO Library in the solution.&lt;/P&gt;&lt;P&gt;Do I need to need to add a Reference to System.Drawing to it as well ?</description><pubDate>Mon, 11 Sep 2006 08:44:37 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2726.aspx</link><description>Ah, you will need to add a reference to System.Drawing.dll, which is NOT added by default to a business object library project.</description><pubDate>Mon, 11 Sep 2006 08:38:06 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2725.aspx</link><description>Hi Ben.&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Got rid of that error, and now I have this one:&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #77dd77"&gt;Type 'System.Drawing.Bitmap' is not defined.&lt;/FONT&gt;</description><pubDate>Mon, 11 Sep 2006 08:36:37 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2721.aspx</link><description>You have to customize the field within the BOMapper and do two things:&lt;P&gt;1) Set the data type to System.Drawing.Bitmap&lt;BR&gt;2) Check the "Serialized" box.&lt;/P&gt;&lt;P&gt;Most likely, you forgot to check the serialized box :)</description><pubDate>Mon, 11 Sep 2006 08:06:28 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Getting an error when setting an image</title><link>http://forum.strataframe.net/FindPost2711.aspx</link><description>Sorry, forgot to post the error.&lt;/P&gt;&lt;P&gt;It's probably the emotion of the moment ...&lt;/P&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #bbddbb"&gt;Value of type 'System.Drawing.Bitmap' cannot be converted to '1-dimensional array of Byte'.&lt;/FONT&gt;</description><pubDate>Sat, 09 Sep 2006 11:44:35 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>