﻿<?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?)  » Enums and SmallInt</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 16:01:43 GMT</lastBuildDate><ttl>20</ttl><item><title>Enums and SmallInt</title><link>http://forum.strataframe.net/FindPost13428.aspx</link><description>I was having trouble getting an enum type to work properly on one of my business objects.&amp;nbsp; The DB type was smallint.&amp;nbsp; I kept getting 'specified cast is invalid'.&amp;nbsp; Of course, I kept thinking I was doing something wrong.&amp;nbsp; Then, on a whim, I changed the DB type from smallint (int16)&amp;nbsp;to int (int32) and the enum type now works without errors.&lt;/P&gt;&lt;P&gt;Can someone please confirm that a smallint data type will not work with enumerations in StrataFrame?&amp;nbsp; &lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Bill</description><pubDate>Mon, 14 Jan 2008 18:25:52 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Enums and SmallInt</title><link>http://forum.strataframe.net/FindPost13434.aspx</link><description>Excellent!&amp;nbsp; Thank you!!</description><pubDate>Mon, 14 Jan 2008 18:25:52 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item><item><title>RE: Enums and SmallInt</title><link>http://forum.strataframe.net/FindPost13429.aspx</link><description>[quote]Can someone please confirm that a smallint data type will not work with enumerations in StrataFrame?&amp;nbsp; [/quote]&lt;/P&gt;&lt;P&gt;This is not StrataFrame...this is .NET.&amp;nbsp; You can define an enum several different ways, but if you do not implicitly define the integer type, then it assumes Int32.&amp;nbsp; So yes, it is generally best to use an Int32 for Enums:&lt;/P&gt;&lt;P&gt;Public Enum MyEnum &lt;FONT color=#1111ff&gt;As Integer - Implied if left off&lt;/FONT&gt;</description><pubDate>Mon, 14 Jan 2008 17:19:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>