﻿<?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?)  » Validation</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 23 May 2026 11:00:13 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Validation</title><link>http://forum.strataframe.net/FindPost5623.aspx</link><description>Thanks Ben and Gary.&lt;P&gt;In the application I'm planning to rewrite&amp;nbsp;using StrataFrame, I have a global static class&amp;nbsp;with properties which return&amp;nbsp;a regular expression&amp;nbsp;formula and&amp;nbsp;associated&amp;nbsp;tooltip for each&amp;nbsp;user field.&amp;nbsp; The downside&amp;nbsp;to this&amp;nbsp;method&amp;nbsp;is the need to update the class everytime&amp;nbsp;changes are made&amp;nbsp;the db schema.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Anyways, I thought I'd try something a little different this time around knowing now&amp;nbsp;that Strataframe exposes what I need easily.&lt;/P&gt;&lt;P&gt;--Lenard&lt;P&gt;P.S.&amp;nbsp; When I download the trial version, I didn't see any API help file.&amp;nbsp; Is it only available when one purchases StrataFrame?</description><pubDate>Fri, 05 Jan 2007 22:26:49 GMT</pubDate><dc:creator>Lenard Dean</dc:creator></item><item><title>Validation</title><link>http://forum.strataframe.net/FindPost5598.aspx</link><description>&lt;FONT size=3&gt;Hi,&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=3&gt;When checking&amp;nbsp;for broken rules, how does one check&amp;nbsp;the&amp;nbsp;DB field's type &amp;amp; size of&amp;nbsp;a mapped BO&amp;nbsp;"field"?&amp;nbsp; I would like to&amp;nbsp;limit the user's&amp;nbsp;entry to what&amp;nbsp;the actual&amp;nbsp;DB field will allow.&amp;nbsp; Or what are others doing?&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=3&gt;--Lenard&lt;/FONT&gt;</description><pubDate>Fri, 05 Jan 2007 22:26:49 GMT</pubDate><dc:creator>Lenard Dean</dc:creator></item><item><title>RE: Validation</title><link>http://forum.strataframe.net/FindPost5603.aspx</link><description>Howdy, Lenard, &lt;/P&gt;&lt;P&gt;There are static (shared) collections that contain the database types and field lengths for the business objects.&amp;nbsp; Each business object class has it's own set of collections.&amp;nbsp; Being static, you cannot access them through the "this" (or Me) reference, you have to use the ClassName.Collection notation.&lt;/P&gt;&lt;P&gt;If you look in one of the .designer.* files for your business objects and go to the static constructor for the class, you'll find where the collections are populated the first time a business object of that type is created.&lt;/P&gt;&lt;P&gt;AllFieldsList -- A List&amp;lt;string&amp;gt; containing all of the fields in the business object&lt;BR&gt;FieldDbTypes -- A Dictionary&amp;lt;string, System.Data.DbType&amp;gt; containing the DbTypes of all of the fields on the business object&lt;BR&gt;FieldEnums -- A dictionary containing the enum values that represent each field.&amp;nbsp; You can also obtain the values by using Enum.Parse(), but it's faster to pull them from a dictionary&lt;BR&gt;FieldLengths -- A Dictionary&amp;lt;string, int&amp;gt; containing the lengths of the fields&lt;BR&gt;FieldNativeDbTypes -- A Dictionary&amp;lt;string, int&amp;gt; containing the native DbType enum values for the business object.&amp;nbsp; If the BO was mapped to a SQL database, then the values will be System.Data.SqlDbType and can be cast accordingly.&amp;nbsp; System.Data.OracleClient.OracleType for an Oracle BO, System.Data.OleDb.OleDbType for OLE DB, etc.&lt;/P&gt;&lt;P&gt;Hopefully that will help.</description><pubDate>Fri, 05 Jan 2007 09:25:13 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Validation</title><link>http://forum.strataframe.net/FindPost5600.aspx</link><description>Hi Lenard&lt;/P&gt;&lt;P&gt;There is no totally straightforward answer that I know of. However, if you look in the BOMapper generated code of the business object in question, there are many collections of table related metadata that you could use to obtain schema information to compare against entered data.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;-=Gary</description><pubDate>Fri, 05 Jan 2007 08:43:20 GMT</pubDate><dc:creator>Gary Wynne</dc:creator></item></channel></rss>