﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » SQL field type needed for a serializable BO field</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 10 Jun 2026 20:36:14 GMT</lastBuildDate><ttl>20</ttl><item><title>SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4739.aspx</link><description>I was going to try out this serializable thingy, i.e. try to store a bitmap (are other image types supported?) in a table field.  What should the SQL column be defined as?  varbinary? varchar?</description><pubDate>Wed, 22 Nov 2006 16:39:40 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4758.aspx</link><description>Thanks!</description><pubDate>Wed, 22 Nov 2006 16:39:40 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4756.aspx</link><description>[quote]f MyPictureBox is bound via SF, then saving it should save the serialized bitmap back to db right? [/quote]&lt;/P&gt;&lt;P&gt;Correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;[quote] The Generic Nullable didn't work. What is an appropriate replacement value? [/quote]&lt;/P&gt;&lt;P&gt;Just return an alternate value and put something like this:&lt;/P&gt;&lt;P&gt;[codesnippet]New CType(System.Drawing.Bitmap(1,1), System.Drawing.Image)[/codesnippet]</description><pubDate>Wed, 22 Nov 2006 16:22:58 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4754.aspx</link><description>Ah...one more question (ok, maybe there will be more): How do I handle NULLs in the BO?  I.e. the image may not be required, so how do I handle that. The Generic Nullable didn't work.  What is an appropriate replacement value?</description><pubDate>Wed, 22 Nov 2006 15:52:37 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4753.aspx</link><description>Actually, I'm talking about WinForms.  I think I might have figured it out. Something like:&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
' imageFile is the full path to an image&lt;br&gt;
MyPictureBox.Image = CType(New Bitmap(imageFile), Image)&lt;br&gt;
[/codesnippet]&lt;br&gt;
&lt;br&gt;
If MyPictureBox is bound via SF, then saving it should save the serialized bitmap back to db right?</description><pubDate>Wed, 22 Nov 2006 15:50:58 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4752.aspx</link><description>The column will be created as a Byte[] field on the business object, so if you set the field to any byte array, then you can just save it and it will dump it to the database.&amp;nbsp; &lt;/P&gt;&lt;P&gt;However, if you're talking about letting your users upload things on your website... I'm not sure.&amp;nbsp; There are controls you can use to upload objects to your webserver, and there might be one in the basic ASP.NET controls, but I've never used one.</description><pubDate>Wed, 22 Nov 2006 15:36:11 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4749.aspx</link><description>Thanks!  &lt;br&gt;
&lt;br&gt;
Next question:  how do you allow a user to upload an image into this sort of field, so it can be saved?</description><pubDate>Wed, 22 Nov 2006 15:21:43 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: SQL field type needed for a serializable BO field</title><link>http://forum.strataframe.net/FindPost4741.aspx</link><description>You will use a VarBinary(MAX) for SQL Server 2005 and Image for SQL Server 2000.</description><pubDate>Wed, 22 Nov 2006 13:13:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>