﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / Updates and Information / StrataFrame Users Contributed Samples </title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Sat, 17 May 2008 13:10:11 GMT</lastBuildDate><ttl>20</ttl><item><title>Visual Studio Add In</title><link>http://forum.strataframe.net/Topic15566-26-1.aspx</link><description>I wrote this add-in to save myself some time while working on a project I am doing that has lots of lookup tables and views. It took me a bit longer that I thought but it was interesting.I think it's a useful utility and add-in example to share with all of you. Hope it helps&lt;P&gt;I put this together LATE last night and finshed tonight so beware :) there might be a mosquito just waiting to sting:D.&lt;/P&gt;&lt;P&gt;I added a few screenshots, a zip with the source andv a zip containing the addin and the .dll you can just unzip to your C:\Documents and Settings\[username]\My Documents\Visual Studio 2008\Addins or wherever you addins directory is. &lt;/P&gt;&lt;P&gt;Gotta go Enjoy&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;Currently to set up a bo&lt;/P&gt;&lt;P&gt;1.Add each business object(s)  to VisualStudio--- for 10 Bo's do this step 10 times&lt;/P&gt;&lt;P&gt;2.Launch the business object mapper&lt;/P&gt;&lt;P&gt;3.Configure the project&lt;/P&gt;&lt;P&gt;4.Configure the each Business Object--- for 10 Bo's do this step 10 times&lt;/P&gt;&lt;P&gt;5. Build the partial class(s). You would select the table and views you wich to create &lt;/P&gt;&lt;P&gt;With Add In&lt;/P&gt;&lt;P&gt;1. Launch BoGenerator&lt;/P&gt;&lt;P&gt;2.Configure project (Same as step 3 above)&lt;/P&gt;&lt;P&gt;3.Select multiple Table(s) and View(s) from list.&lt;/P&gt;&lt;P&gt;4.Generate Business Object --- for 10 bo's it add's all 10 bo's to project and also configures the business object&lt;/P&gt;&lt;P&gt;5.Auto Launches the bo mapper then Build Partial Classes (Same as step 5)</description><pubDate>Fri, 11 Apr 2008 21:00:41 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>Fun with Macros</title><link>http://forum.strataframe.net/Topic15697-26-1.aspx</link><description>In VFP I enjoyed the comment / uncomment right click menu option for blocks of code.  The closest I've been able to find in the VB 2008 IDE is a macro sample to comment and nothing to uncomment.  Soooo, this may be old hat to experienced VS users but if you're a newbie like me you may find this useful :&lt;P&gt;Tools / Customize / Macros&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/dae1e85b-6b1e-4005-8877-c304.jpg"&gt;&lt;/P&gt;&lt;P&gt;Now you can drag that Samples.VSEditor.CommentRegion right onto a toolbar.  Then, with the Customize dialog still open, right click on what you dragged onto the bar and select Default Style&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/46b601f1-0fbf-46fb-b62a-e859.jpg"&gt;&lt;/P&gt;&lt;P&gt;Which will reduce it to a blank icon and then pick Chang Button Image to give it an icon.&lt;/P&gt;&lt;P&gt;Okay, now if you hightlight a block of text in code it will all be commented out with single quotes&lt;/P&gt;&lt;P&gt;But what of uncommenting ?&lt;/P&gt;&lt;P&gt;I wrote this macro which you can paste into the macro file that comes up when you open the Macros IDE ( you can drag that out of Tools in customize and onto a menu )&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; UncommentBlock()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; current &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;current = DTE.Active&amp;#100;ocument.Name&lt;/P&gt;&lt;P&gt;DTE.ExecuteCommand(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Edit.Find"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;DTE.ExecuteCommand(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Edit.SwitchtoQuickReplace"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;DTE.ExecuteCommand(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Edit.SelectAll"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;DTE.Windows.Item(current).Activate()&lt;/P&gt;&lt;P&gt;DTE.Find.FindWhat = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"'"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DTE.Find.ReplaceWith = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;""&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocumentSelection&lt;/P&gt;&lt;P&gt;DTE.Find.MatchCase = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DTE.Find.MatchWholeWord = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;False&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DTE.Find.MatchInHiddenText = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral&lt;/P&gt;&lt;P&gt;DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone&lt;/P&gt;&lt;P&gt;DTE.Find.Action = vsFindAction.vsFindActionReplaceAll&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Throw&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; System.Exception(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"vsFindResultNotFound"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;DTE.Windows.Item(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"{CF2DDC32-8CAD-11D2-9302-005345000000}"&lt;/FONT&gt;&lt;FONT size=2&gt;).Close()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Just does a search and replace for ' inside a highlighted block&lt;/P&gt;&lt;P&gt;As soon as you save the macro file, you'll find that one the same place you found the CommentRegion() and you can put it on a toolbar the same way.&lt;/P&gt;&lt;P&gt;I'll put the tasklist thing in a separate message.</description><pubDate>Wed, 16 Apr 2008 13:31:00 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>Synch ListView Control</title><link>http://forum.strataframe.net/Topic14966-26-1.aspx</link><description>This is a sample of how to use a list view to navigate through the records of a ListView and keep the ListView in synch with the BO.  A SF ListView was subclassed to add the synching functionality.  See the project for info on how it was done. The project uses the StrataFrameSample db.&lt;br&gt;&lt;br&gt;Features:&lt;br&gt;- Fairly easy to setup.&lt;br&gt;- Handles adding, updating and deleting within the BO&lt;br&gt;- Selecting an item in the list navigates to that item in the BO.&lt;br&gt;- Navigation of the BO automatically updates selected item in the list.&lt;br&gt;- Filling the data table automatically updates the list and synchs it&lt;br&gt;&lt;br&gt;Usage:&lt;br&gt;- Drop a BO on the form&lt;br&gt;- Drop this control on the form&lt;br&gt;- Setup the columns for the listview (normal SF procedure)&lt;br&gt;- Setup the Population list settings.  The method must be CopyDataFrom using the business layer overload.&lt;br&gt;- Set the BO of the synch list control&lt;br&gt;&lt;br&gt;These are the basics. The last step depends on how you will load the BO. In the sample, the BO is simply loaded when the form is loaded. In that case, have the list load when the form is loaded also and be sure the initialization priority of the list to be [b]larger[/b] than the priority of the form (the BO needs to be loaded first). &lt;br&gt;&lt;br&gt;If you load the BO manually, then the list should be loaded manually also. Whenever you load the BO, simply call the UpdateAndSynch() method of the list after loading.&lt;br&gt;&lt;br&gt;I typically will call the SelectFirstListItem() method after the load in order to make sure that the first item in the list is selected.  This could probably be built in, but isn't at this point.&lt;br&gt;&lt;br&gt;As always, comments/suggestions/improvements are welcome and appreciated!&lt;br&gt;&lt;br&gt;Greg</description><pubDate>Mon, 17 Mar 2008 12:50:49 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>Code Snippet Editor</title><link>http://forum.strataframe.net/Topic11963-26-1.aspx</link><description>This may fall into the category of "Well, duh!" but just in case anybody is lower on the learning curve than I am :&lt;P&gt;There is an extremely cool code snippets editor on the tools menu of VS.  Basically is adds stuff to intellisense.&lt;/P&gt;&lt;P&gt;I created a new folder for Strataframe snippets.  Here is an example of a Custom Field Property snippet&lt;/P&gt;&lt;P&gt;( this is instead of cutting and pasting from the bo.designer generated code as in the beginner tutorial. Note that the string datatype is hardcoded so either make a $replacement$ for it or remember to change it if your custom field prop isn't string )&lt;/P&gt;&lt;FONT color=#0000ff&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;#Region&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;FONT color=#8b0000&gt;" Custom Field Properties "&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;''' &amp;lt;summary&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;''' $Custom Field Description$ &lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;''' &amp;lt;/summary&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;''' &amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;lt;Browsable(&lt;FONT color=#0000ff&gt;False&lt;/FONT&gt;), _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;BusinessFieldDisplayInEditor(), _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Description(&lt;FONT color=#8b0000&gt;"$Custom Field Description$"&lt;/FONT&gt;), _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)&amp;gt; _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;ReadOnly&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Property&lt;/FONT&gt; [$Property Name$]() &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; System.String&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;Get&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;Return&lt;/FONT&gt; $Property Value$ &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Get&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Property&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;Protected&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Overrides&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt; GetCustomBindablePropertyDescriptors() &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; MicroFour.StrataFrame.Business.FieldPropertyDescriptor()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;'-- Create and return a new array of FieldPropertyDescriptor&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;' objects that contains the ReflectionPropertyDescriptor&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;' for the $Property Name$ field.&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;Return&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#8b0000&gt;"$Property Name$"&lt;/FONT&gt;, &lt;FONT color=#0000ff&gt;GetType&lt;/FONT&gt;($BOName$))}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="Courier New"&gt;Function&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;#End Region&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;On the Imports tab you enter the stuff that must be imported for this to work&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;System.ComponentModel&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;Microfour.Strataframe.UI.Windows.Forms&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;For a shorcut I used cpr&lt;/P&gt;&lt;P&gt;Now if you are in the BO code, you just but the cursor under the Event Handlers region, type cpr, hit tab and everthing you see above gets typed in with the cursor on the first Replacement.  You fill it in, tab to the next one etc.&lt;/P&gt;&lt;P&gt;If the imports statements are not at the top of the declaration, the snippet editor puts them in !&lt;/P&gt;&lt;P&gt;I think this is cool and I'm pretty sure I've only scratched the surface of the possiblities here.&lt;/P&gt;&lt;P&gt;You may not see the Code Snippet Editor on the Tools menu ( for some reason mine didn't have it ) but if you Google you'll find it for download with easy instructions to install in.  Comes with a lot of predone VB stuff as well.&lt;/P&gt;&lt;P&gt;I've added &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FillbyParam ( fbp )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; Fillby$Subname$(&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt; $param1$ &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;String&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;'-- Establish locals&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;Dim&lt;/FONT&gt; loCommand &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt; SqlCommand()&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;'-- Build the query&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;loCommand.CommandText = &lt;FONT color=#8b0000&gt;"SELECT $Fieldlist$ FROM $tablename$ WHERE $param1$ like @$param1$+'%'"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color=#006400&gt;&lt;FONT face="Courier New"&gt;'-- Add the parameter&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;loCommand.Parameters.Add(&lt;FONT color=#8b0000&gt;"@$param1$"&lt;/FONT&gt;, SqlDbType.NVarChar)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;loCommand.Parameters(&lt;FONT color=#8b0000&gt;"@$param1$"&lt;/FONT&gt;).Value = $param1$&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Courier New" color=#006400&gt;'-- Execute the command to fill the business object&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Me.FillDataTable(loCommand)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;End Sub Fillby$Subname$&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MessageboxYesNo '&lt;/STRONG&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#000000&gt; dr &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000&gt; DialogResult = _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;MessageBox.Show(&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#8b0000&gt;"$Message$"&lt;/FONT&gt;,&lt;FONT color=#8b0000&gt;"$Heading$"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;, MessageBoxButtons.YesNo, MessageBoxIcon.Warning)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;If&lt;/FONT&gt; dr = Windows.Forms.DialogResult.Yes &lt;FONT color=#0000ff&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#0000ff&gt;End if&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size=3&gt;&lt;FONT size=2&gt;&lt;FONT size=3&gt;&lt;FONT size=1&gt;&lt;FONT face=Arial color=#111111&gt;( sorry for the blank lines but I can't figure out how to turn off big line spaces after pasting code )&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=3&gt;&lt;FONT size=2&gt;&lt;FONT size=3&gt;&lt;FONT size=1&gt;&lt;FONT face=Arial color=#111111&gt;Would like to see what you guys who know a lot more about this stuff are doing with snippets  :D&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=3&gt;&lt;FONT size=2&gt;&lt;FONT size=3&gt;&lt;FONT size=1&gt;&lt;FONT face=Arial color=#111111&gt;Charles&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size=3&gt;&lt;FONT size=2&gt;&lt;FONT size=3&gt;&lt;FONT size=1&gt;&lt;FONT color=#0000ff&gt; &lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sat, 13 Oct 2007 14:42:14 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>Boolean format provider</title><link>http://forum.strataframe.net/Topic14853-26-1.aspx</link><description>I just had the need to provide some custom formatting for a boolean value other than the default. The default is to convert a true value to the string defined by the shared (static in C#) readonly property TrueString ("True") of the Boolean structure and a false value to the string defined by the shared (static in C#) readonly property FalseString ("False") of the Boolean structure. &lt;br&gt;&lt;br&gt;If you need to display something else for a boolean, there is no default way within .NET to do this. They provide no nifty format codes that can be used with the String.Format() method (see note below) and while the ToString() method has an overload that accepts an IFormatProvider, MSDN states (and my tests verify) that the provider isn't ever used, even if provided.&lt;br&gt;&lt;br&gt;Examples of what I'm trying to accomplish:&lt;br&gt;&lt;br&gt;- field that indicates if a CD is loaded into a drive or not, display "Loaded" for true and "Unloaded" for false.&lt;br&gt;- field that indicates if a person is married, display "yes" for true, "no" for false.&lt;br&gt;- field that indicates if an employee is a manager, display "M" for true, empty string for false.&lt;br&gt;&lt;br&gt;What I've done is create a class that implements IFormatProvider and ICustomFormatter. This allows me to then use the class with the String.Format() method to customize the display of boolean values. Here is how I'd implement the examples above:&lt;br&gt;&lt;br&gt;[codesnippet]Dim isCDLoaded As Boolean&lt;br&gt;MessageBox.Show(String.Format(New BooleanFormatProvider("Loaded|Unloaded"), isCDLoaded)&lt;br&gt;' shows 'Unloaded'&lt;br&gt;Dim isMarried As Boolean = True&lt;br&gt;MessageBox.Show(String.Format(New BooleanFormatProvider("yes|no"), isCDLoaded)&lt;br&gt;' shows 'yes'&lt;br&gt;Dim isManager As Boolean = True&lt;br&gt;MessageBox.Show(String.Format(New BooleanFormatProvider("M|"), isCDLoaded)&lt;br&gt;' shows 'M'&lt;br&gt;isManager = False&lt;br&gt;MessageBox.Show(String.Format(New BooleanFormatProvider("M|"), isCDLoaded)&lt;br&gt;' shows ''&lt;br&gt;[/codesnippet]&lt;br&gt;&lt;br&gt;This formatter lets you define the strings used for true and false values. You can also define the delimiter that is used between these parts. The constructors allow you define the default format string. See the sample for more details on how this is accomplished.&lt;br&gt;&lt;br&gt;Please note this is my first attempt as coding either of these interfaces, so I'd appreciate any helpful hints/suggestions! &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[b]Note[/b]: E.g. if you have a Date variable myDate, you can get string formatted as a short date with String.Format by simply using:&lt;br&gt;&lt;br&gt;[codesnippet]String.Format("{0:d}",myDate)[/codesnippet]</description><pubDate>Thu, 13 Mar 2008 15:24:51 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>StrataFrame Windows Application with Security</title><link>http://forum.strataframe.net/Topic14216-26-1.aspx</link><description>Attached to this message is a 15 page word document that takes a user, step by step, through the entire process of creating a windows application that has security enabled where the security tables are located in a separate database from the application database.  I figured if I had to go through these steps to either prove or disprove the presence of a bug in StrataFrame, that others new to the framework would benefit greatly from a step by step tutorial describing how to do it. &lt;/P&gt;&lt;P&gt;Enjoy!&lt;FONT size=1&gt;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 08 Feb 2008 13:48:16 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>CurrencyTextBox from StrataFrame TextBox</title><link>http://forum.strataframe.net/Topic14533-26-1.aspx</link><description>Hi...&lt;P&gt;Creating a component for edition of a field currency from a class base of the StrataFrame.&lt;/P&gt;&lt;P&gt;Success !!!&lt;/P&gt;&lt;P&gt;[p]Rogério :)&lt;BR&gt;&lt;A href="http://blog.licitec.com.br/"&gt;http://blog.licitec.com.br&lt;/A&gt; [/p]&lt;/P&gt;&lt;P&gt;[hr]&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;using System;&lt;BR&gt;using System.Collections.Generic;&lt;BR&gt;using System.Text;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;namespace Licitec.StrataFrame.WinForms&lt;BR&gt;{&lt;BR&gt;    public class CurrencyTextBox : MicroFour.StrataFrame.UI.Windows.Forms.Textbox &lt;BR&gt;    {&lt;BR&gt;        protected override void OnValidating(System.ComponentModel.CancelEventArgs e)&lt;BR&gt;        {&lt;BR&gt;            System.Globalization.CultureInfo culture;&lt;BR&gt;            culture = System.Globalization.CultureInfo.CreateSpecificCulture("pt-BR");&lt;BR&gt;            decimal result;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;            if (this.Text.Trim() != string.Empty &amp;amp;&amp;amp; !decimal.TryParse(this.Text, System.Globalization.NumberStyles.Currency, culture, out result))&lt;BR&gt;            {&lt;BR&gt;               &lt;BR&gt;                this.HideSelection = false;&lt;BR&gt;                this.SelectAll();&lt;BR&gt;                System.Windows.Forms.MessageBox.Show("Entre com um valor válido.");&lt;BR&gt;                this.HideSelection = true;&lt;BR&gt;                e.Cancel = true;&lt;BR&gt;            }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;            base.OnValidating(e);&lt;BR&gt;        }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;        protected override void OnValidated(EventArgs e)&lt;BR&gt;        {&lt;BR&gt;            decimal result;&lt;BR&gt;            if (this.Text.Trim() == string.Empty)&lt;BR&gt;            {&lt;BR&gt;                result = 0;&lt;BR&gt;            }&lt;BR&gt;            else&lt;BR&gt;            {&lt;BR&gt;                result = Decimal.Parse(this.Text, System.Globalization.NumberStyles.Currency);&lt;BR&gt;            }&lt;BR&gt;            this.Text = result.ToString("c"); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;            base.OnValidated(e);&lt;BR&gt;        }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;        protected override void OnEnter(EventArgs e)&lt;BR&gt;        {&lt;BR&gt;            System.Globalization.CultureInfo culture;&lt;BR&gt;            culture = System.Globalization.CultureInfo.CreateSpecificCulture("pt-BR");&lt;BR&gt;            decimal result;&lt;BR&gt;            if (decimal.TryParse(this.Text, System.Globalization.NumberStyles.Currency, culture, out result))&lt;BR&gt;            {&lt;BR&gt;                this.Text = result.ToString();&lt;BR&gt;            }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;            base.OnEnter(e);&lt;BR&gt;        }&lt;BR&gt;    }&lt;BR&gt;}&lt;/FONT&gt;</description><pubDate>Fri, 22 Feb 2008 17:36:20 GMT</pubDate><dc:creator>Rogerio Mauri</dc:creator></item><item><title>Janus Controls Wrapper</title><link>http://forum.strataframe.net/Topic13316-26-1.aspx</link><description>Thanks everyone for helping me through the forum posts, I'm attaching the source code of a wrapper I'm working on. The Janus Grid Control is still a work in progress since I'm working on a several enhancements. &lt;P&gt;I'm open to suggestions and criticism too :hehe:</description><pubDate>Wed, 09 Jan 2008 08:19:58 GMT</pubDate><dc:creator>Guillermo Vilas</dc:creator></item><item><title>A BO for populating Foreign Key Lookups</title><link>http://forum.strataframe.net/Topic13969-26-1.aspx</link><description>G' day&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;A week or so ago I participated in a thread regarding foreign keys in BOs and how to show a description in place of the key in a devexpress grid. My suggestion was to put a lookup on the column, and I went on to say that the company I work for has developed a method for implementing this without using a BO designed and built for every different foreign key. Richard Keller asked whether I could expand on this method, so I will present it here.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;A bit of background, we are developing windows applications using StrataFrame (obviously) and devexpress with SQL Server as the database. We work mainly in the Tanning and Agricultural industries so that may explain my obscure choice of examples. Our Main product is the Tannery Management System, so that explains references to TMS in our code. Our expertise is with SQL server rather than .net programming (although we're learning). &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;We use GUIDs as keys to all our tables, however this technique dos not depend on that.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;Most of our configuration tables have an Active Flag e.g. tblSPCSpecies has a column SPCActive so if the table has rows for Kangaroo and Cow where SPCActive is true then the system is able to use Kangaroo or Cow for processing whereas a row for Goat may have SPCActive set false indicating if that Goat can't currently be used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;We may also have lookups populated by our more transactional tables such as tblBTCBatches returning the batch number and some other details, but filtered by batch type, or other parameters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;So we developed the class boLookupTable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;It has four properties that have attributes that allow the values to be set at design time. These are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;FilterOnActive,&lt;SPAN style="mso-tab-count: 1"&gt;   &lt;/SPAN&gt;A Boolean that indicates if our form boilerplate will repopulate the lookup BO based on the active flag when editing a new record. This is so that when we are looking at old rows we can see those related to Goats, but if we enter a new one we can only add Kangaroos and Cows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;FilterOnPKOfFormsPrimaryBO,&lt;SPAN style="mso-tab-count: 1"&gt;   &lt;/SPAN&gt;A Boolean that indicates if our form boilerplate will filter the lookup BO based on the PK of the form's Primary BO. If this is set then the PK of the form's Primary BO will be passed to the stored procedure as parameter "@ParentPK", and provides an automated means of parent child filtering in some of forms (although it has not proved as useful as we had originally thought).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;PopulateAtParentFormLoading,&lt;SPAN style="mso-tab-count: 1"&gt;   &lt;/SPAN&gt;A Boolean that indicates if the lookup BO should be populated at parent form loading. This is useful for the kind of configuration file where there is no active flag and no other filtering, i.e. load once and it's done.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;PopulateStoredProcedureName, A string with the name of the stored procedure that will be used to populate the lookup BO.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;There are also a number of overloads of a method RefreshBO that can be used to take control of the population of the lookup BO by sending upto 6 parameters to the stored procedure. RefreshBO can be called with zero to 6 pairs of ParameterName As String &amp;amp; ParameterValue As Object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;We've based all our BOs on our own base that inherits from the Strataframe Business Layer (?). Each of our BOs expose a property BOType that is used by our form boiler plate to identify lookup BOs so it can apply the appropriate filtering.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;No that we've got our boLookupTable all compiled we need to use the BO Mapper on it. But what do we map it to. Well since it is never updating and deleting and we are going to take care of population through a stored procedure, we can map it to a view. But what view? Well, it doesn't matter as long as it has two columns PK and Name. We use something similar to the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IF EXISTS &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;SELECT &lt;/SPAN&gt;&lt;FONT color=#000000&gt;* &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;FROM &lt;/SPAN&gt;&lt;FONT color=#000000&gt;sysobjects &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;WHERE &lt;/SPAN&gt;&lt;FONT color=#000000&gt;type = &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'V' &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;AND name &lt;/SPAN&gt;&lt;FONT color=#000000&gt;= &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'vw_boLookupTable'&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&lt;FONT color=#000000&gt;            &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;DROP &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;View &lt;/SPAN&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;vw_&lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;boLookupTable'&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;SET &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;ANSI_NULLS &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;ON&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;SET QUOTED_IDENTIFIER ON&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;CREATE VIEW &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;[dbo].[vw_&lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;boLookupTable'&lt;/SPAN&gt;&lt;FONT color=#000000&gt;]&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;SELECT CONVERT&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;UNIQUEIDENTIFIER&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'00000000-0000-0000-0000-000000000000'&lt;/SPAN&gt;&lt;FONT color=#000000&gt;) &lt;/FONT&gt;&lt;?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /&gt;&lt;st1:Street w:st="on"&gt;&lt;st1:address w:st="on"&gt;&lt;SPAN style="COLOR: blue"&gt;AS &lt;/SPAN&gt;&lt;FONT color=#000000&gt;PK&lt;/FONT&gt;&lt;/st1:address&gt;&lt;/st1:Street&gt;&lt;FONT color=#000000&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;       &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;'' &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;as Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;Anyway, with this view in place we run the BOM, configure the fields for nulls, and build the partial. As far as Nulls go, we try to avoid them in the database, but haven't entirely, and we map all our BOs with all columns as nullable generic, except for strings which "return alternate on null" with the alternate being "string.empty". I'll admit I'm not entirely sure why we chose this means of handling nulls, but it works well for us.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;We're just about ready to drop the boLookupTable instance on our form, but first we will need a stored procedure to populate it, and it has to conform to some rules:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;1. It must return two columns PK and Name. In our case PK is always a GUID except in a few cases I'll describe how to handle later. Name is always a string, and it should be a description extracted from the database table that we are looking up possibly combined with related data from other tables. Because the Name is coming from the database, there is no localization necessary, i.e. if the system is being run in &lt;st1:place w:st="on"&gt;&lt;st1:country-region w:st="on"&gt;Brazil&lt;/st1:country-region&gt;&lt;/st1:place&gt;, we would have a species described as Vaca, not one described as Cow that had to be translated to Portuguese.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;2. The Stored Procedure must be able to be called with however many parameters the programmer wants to use. This means that all the parameters must have defaults within the stored procedure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;3. All the parameters in the stored procedure must be sql_variant in the stored procedure so an object can be passed to them. There are some problems with efficiency using sql_variant in a select so we always convert the parameter to a variable of the correct type for comparison in the select of the Stored Procedure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;This is an example (not necessarily a good one) of such a stored procedure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IF EXISTS &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;SELECT &lt;/SPAN&gt;&lt;FONT color=#000000&gt;* &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;FROM &lt;/SPAN&gt;&lt;FONT color=#000000&gt;sysobjects &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;WHERE &lt;/SPAN&gt;&lt;FONT color=#000000&gt;type = &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'P' &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;AND name &lt;/SPAN&gt;&lt;FONT color=#000000&gt;= &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'stp_cluATTForBTC'&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 2"&gt;&lt;FONT color=#000000&gt;            &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;DROP &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Procedure &lt;/SPAN&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;stp_cluATTForBTC&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;SET &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;ANSI_NULLS &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;ON&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;SET QUOTED_IDENTIFIER ON&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;CREATE Procedure &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;dbo.stp_cluATTForBTC&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;@BTCID &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;sql_variant &lt;/SPAN&gt;&lt;FONT color=#000000&gt;= &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;Null&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;@ParentPK &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;sql_variant &lt;/SPAN&gt;&lt;FONT color=#000000&gt;= &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;Null&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;@BatchType &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;sql_variant &lt;/SPAN&gt;&lt;FONT color=#000000&gt;= &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'0'&lt;/SPAN&gt;&lt;FONT color=#000000&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;@Active &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;sql_variant &lt;/SPAN&gt;&lt;FONT color=#000000&gt;= &lt;/FONT&gt;&lt;SPAN style="COLOR: #a31515"&gt;'0'&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;SET NOCOUNT ON&lt;/SPAN&gt;&lt;FONT color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;declare &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyBTCID &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;as uniqueidentifier&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@BTCID &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;is not null&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;begin&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;            &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;set &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyBTCID = &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;CONVERT&lt;/SPAN&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;UNIQUEIDENTIFIER&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, @BTCID)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;end&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;else &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;begin&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;            &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;set &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyBTCID = &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;CONVERT&lt;/SPAN&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;UNIQUEIDENTIFIER&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, @ParentPK)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;end&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;declare &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyBatchType &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;as int&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;set &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyBatchType = &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;CONVERT&lt;/SPAN&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, @BatchType)&lt;SPAN style="mso-spacerun: yes"&gt;        &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;declare &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyActive &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;as int&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;         &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;set &lt;/SPAN&gt;&lt;FONT color=#000000&gt;@MyActive = &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;CONVERT&lt;/SPAN&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;int&lt;/SPAN&gt;&lt;FONT color=#000000&gt;, @Active)&lt;SPAN style="mso-spacerun: yes"&gt;        &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;SELECT &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt;   &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;DISTINCT &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;          &lt;/SPAN&gt;dbo.tblATTAttrTypes.ATTID &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;AS &lt;/SPAN&gt;&lt;FONT color=#000000&gt;PK, &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;          &lt;/SPAN&gt;dbo.tblATTAttrTypes.ATTName &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;AS Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;          &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;FROM &lt;/SPAN&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;     &lt;/SPAN&gt;dbo.tblATTAttrTypes &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;INNER JOIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 3"&gt;                  &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;dbo.tblATSAttrTypeStations &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;ON &lt;/SPAN&gt;&lt;FONT color=#000000&gt;dbo.tblATTAttrTypes.ATTID = dbo.tblATSAttrTypeStations.ATS_ATTID &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;INNER JOIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 3"&gt;                  &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;dbo.tblBTSBatchStations &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;ON &lt;/SPAN&gt;&lt;FONT color=#000000&gt;dbo.tblATSAttrTypeStations.ATSStationType = dbo.tblBTSBatchStations.BTSStationType &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;INNER JOIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 3"&gt;                  &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;dbo.tblBTCBatch &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;ON &lt;/SPAN&gt;&lt;FONT color=#000000&gt;dbo.tblBTSBatchStations.BTSBatchType = dbo.tblBTCBatch.BTCType&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 2"&gt;            &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;WHERE &lt;/SPAN&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-spacerun: yes"&gt;    &lt;/SPAN&gt;(dbo.tblATTAttrTypes.ATTType = 0) &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;AND &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 3"&gt;                  &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;  &lt;/SPAN&gt;(dbo.tblATTAttrTypes.ATTActive &amp;gt;= @MyActive) &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;AND&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;          &lt;/SPAN&gt;((dbo.tblBTCBatch.BTCID = @MyBTCID) &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;OR&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;          &lt;/SPAN&gt;((@MyBTCID &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;Is Null&lt;/SPAN&gt;&lt;FONT color=#000000&gt;) &lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;And &lt;/SPAN&gt;&lt;FONT color=#000000&gt;(dbo.tblBTSBatchStations.BTSBatchType = @MyBatchType)))&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;ORDER BY &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&lt;FONT color=#000000&gt;      &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;option&lt;/SPAN&gt;&lt;FONT color=#000000&gt;(&lt;/FONT&gt;&lt;SPAN style="COLOR: blue"&gt;recompile&lt;/SPAN&gt;&lt;FONT color=#000000&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;&lt;SPAN style="mso-tab-count: 1"&gt;      &lt;/SPAN&gt;&lt;SPAN style="mso-spacerun: yes"&gt; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;FONT color=#000000&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;Note We found that "option(recompile)" is useful to ensure that SQL Server doesn't use an incorrect execution plan when the Where can filter in very different ways depending on the parameters. &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;So now we drop an instance of the boLookupTable on the form, and fill in the population parameters, drag a BusinessBindngSource onto the form, and bind the lookup to the business binding source. And all should work as advertised.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;Now what do we do if the PK of the Table we want to lookup is an Integer? What we have done is make a boLookupTableKeyAsInt which inherits boLookupTable, create a new view where the select is changed to "SELECT 1 AS PK, ' ' AS Name" (we could use the same view and use the BOM to change the type mapping, but throughout our development we have chosen not to do this but to use a standard way of mapping BOs so that no special knowledge is required to map or re-map a BO).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;This technique came about when I was experimenting with attributes and discovered some of what they could do. I'll readily admit I don't fully understand attributes and know this part of the technique could be greatly improved (for one by ensuring a stored procedure name is entered). However by implementing this we eliminated about 130 different BOs used just for lookups. It works very well for us.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;We also have similar methods for dealing with Enum Lookups which I'll expand on later if anyone is interested.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;I've included the code for our boLookupTable and boLookupTableKeyAsInt in the attachement. Unfortunately I haven't had the chance to reformat these as a standalone solution, but I hope it shows what we're doing. I hope you find this useful, and would be very interested to hear what you think, and suggestions for improvement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;o:p&gt;&lt;FONT color=#000000&gt; &lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: none; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#000000&gt;Peter&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;</description><pubDate>Sat, 02 Feb 2008 23:25:04 GMT</pubDate><dc:creator>Peter Denton</dc:creator></item><item><title>Desired Videos and Samples</title><link>http://forum.strataframe.net/Topic13757-26-1.aspx</link><description>We will be creating training videos and more StrataFrame samples.  Please share with us (from both a beginner and advanced user perspective) what types of samples (and videos) that you would like to see.  Please keep your responses relatively brief so that it is easier to catalog the requests.  Thanks! :)</description><pubDate>Sun, 27 Jan 2008 18:31:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Reporting: Create a typed dataset from Business Objects that can be bound at design time to reports, etc</title><link>http://forum.strataframe.net/Topic8417-26-1.aspx</link><description>I needed to create some reports which need data from multiple tables.  Originally I was creating Business Objects based off of views..but that's just ugly to me so.....&lt;br&gt;&lt;br&gt;I created a dataset that I could bind Crystal Reports to at design time.&lt;br&gt;&lt;br&gt;First I created a class that would output an .xsd file with the dataset schema.&lt;br&gt;&lt;br&gt;[quote][codesnippet]Imports System.Data&lt;br&gt;Imports MicroFour.StrataFrame.Business&lt;br&gt;&lt;br&gt;Public Class CreatePICDataset&lt;br&gt;&lt;br&gt;    Private Shared GenderBO As New PICData.Gender&lt;br&gt;    Private Shared InsuranceCardBO As New PICData.InsuranceCard&lt;br&gt;    Private Shared InsuranceTypeBO As New PICData.InsuranceType&lt;br&gt;    Private Shared LanguageBO As New PICData.Language&lt;br&gt;    Private Shared PatientBO As New PICData.Patient&lt;br&gt;    Private Shared PatientHistoryBO As New PICData.PatientHistory&lt;br&gt;    Private Shared RaceBO As New PICData.Race&lt;br&gt;    Private Shared VoterRegBO As New PICData.VoterReg&lt;br&gt;    Private Shared PICDS As New DataSet&lt;br&gt;&lt;br&gt;    Public Shared Sub CreateDataset()&lt;br&gt;        PICDS.DataSetName = "PICDataSet"&lt;br&gt;        AddBOTableToDataset(GenderBO)&lt;br&gt;        AddBOTableToDataset(InsuranceCardBO)&lt;br&gt;        AddBOTableToDataset(InsuranceTypeBO)&lt;br&gt;        AddBOTableToDataset(LanguageBO)&lt;br&gt;        AddBOTableToDataset(PatientBO)&lt;br&gt;        AddBOTableToDataset(PatientHistoryBO)&lt;br&gt;        AddBOTableToDataset(RaceBO)&lt;br&gt;        AddBOTableToDataset(VoterRegBO)&lt;br&gt;        PICDS.WriteXmlSchema("C:\PICDataSet.xsd")&lt;br&gt;    End Sub&lt;br&gt;&lt;br&gt;    Private Shared Sub AddBOTableToDataset(ByVal myBO As BusinessLayer)&lt;br&gt;        myBO.FillDataTable("Select * from " &amp; myBO.TableName &amp; " where 1 = 0")&lt;br&gt;        PICDS.Tables.Add(myBO.CurrentDataTable)&lt;br&gt;    End Sub&lt;br&gt;&lt;br&gt;End Class&lt;br&gt;[/codesnippet][/quote]&lt;br&gt;&lt;br&gt;&lt;br&gt;I call the CreateDataSet method of this class anytime I change my BO's /DB structure.  I then copy the output file to my project and set it as an embedded resource.&lt;br&gt;&lt;br&gt;I then created a class which inherits from dataset and reads it's schema from the embedded .xsd file in the project&lt;br&gt;&lt;br&gt;[quote][codesnippet]Imports System.Data&lt;br&gt;&lt;br&gt;Public Class PICDataset&lt;br&gt;    Inherits DataSet&lt;br&gt;&lt;br&gt;    Private AppAssembly As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly()&lt;br&gt;    Private AppAssemblyPath As String = Me.AppAssembly.GetName().Name().Replace(" ", "_")&lt;br&gt;&lt;br&gt;    Public Sub New()&lt;br&gt;        Try&lt;br&gt;            Me.ReadXmlSchema(GetResource("PICDataSet.xsd"))&lt;br&gt;        Catch ex As Exception&lt;br&gt;            MsgBox(ex.Message)&lt;br&gt;        End Try&lt;br&gt;    End Sub&lt;br&gt;&lt;br&gt;    Private Function GetResource(ByVal FileName As String) As System.IO.Stream&lt;br&gt;        Try&lt;br&gt;            Return Me.AppAssembly.GetManifestResourceStream(Me.AppAssemblyPath &amp; "." &amp; FileName)&lt;br&gt;        Catch ex As Exception&lt;br&gt;            MessageBox.Show("Error returning resource: " &amp; ex.ToString(), "GetResource!", MessageBoxButtons.OK, MessageBoxIcon.Error)&lt;br&gt;            Return Nothing&lt;br&gt;        End Try&lt;br&gt;    End Function&lt;br&gt;&lt;br&gt;End Class[/codesnippet][/quote]&lt;br&gt;&lt;br&gt;At design time I can now bind a report to a Typed Dataset (you could go a step further and add the relationships in code, but I do this in Crystal)&lt;br&gt;&lt;br&gt;At runtime to populate my dataset for a report, I create an instance of the dataset class and add tables using the currentdatatable from my business objects&lt;br&gt;&lt;br&gt;[codesnippet][quote]            Dim ds As New PICDataset&lt;br&gt;            ds.Tables(PatientBO.TableName).Load(PatientBO.CurrentView.ToTable.CreateDataReader)&lt;br&gt;            ds.Tables(GenderBO.TableName).Load(GenderBO.CurrentDataTable.CreateDataReader)&lt;br&gt;            ds.Tables(LanguageBO.TableName).Load(LanguageBO.CurrentDataTable.CreateDataReader)&lt;br&gt;            ds.Tables(RaceBO.TableName).Load(RaceBO.CurrentDataTable.CreateDataReader)&lt;br&gt;            ds.Tables(InsuranceCardBO.TableName).Load(InsuranceCardBO.CurrentDataTable.CreateDataReader)&lt;br&gt;            rptPIF_English.SetDataSource(ds)[/quote][/codesnippet]&lt;br&gt;&lt;br&gt;Hopefully this helps someone.&lt;br&gt;&lt;br&gt;Jerome</description><pubDate>Mon, 23 Apr 2007 09:04:33 GMT</pubDate><dc:creator>Jerome Barnett</dc:creator></item><item><title>AJAX and SF</title><link>http://forum.strataframe.net/Topic12380-26-1.aspx</link><description>It will mimic the Google suggest as well as use Microsoft Maps to parse a traffic feed (RSS) to show road hazards and contruction in you area.&lt;br&gt;&lt;br&gt;Best regards to the community,&lt;br&gt;&lt;br&gt;CTBlankenship</description><pubDate>Fri, 02 Nov 2007 23:15:07 GMT</pubDate><dc:creator>Charles Thomas Blankenship</dc:creator></item><item><title>Example of how to use a base form</title><link>http://forum.strataframe.net/Topic12693-26-1.aspx</link><description>This is an example of how to sub class the SF StandardForm to add functionality beyond what SF provides. I'm providing an example of some functionality that I needed, but of course, you may need vastly different features. Hopefully this might help in figuring out an elegant and pragmatic solution for you also! &lt;br&gt;&lt;br&gt;I found myself very often coding the following features into a form:&lt;br&gt;&lt;br&gt;- setting the title of the form to reflect the current record&lt;br&gt;- constructors that took the ID of a record that was passed to it, then loaded that single record into the form's BO.&lt;br&gt;- constructors that took a boolean that indicated I wanted to add a new record when the form opens.&lt;br&gt;&lt;br&gt;I also need the ability to pass in a BO or data table with the data the form would use.&lt;br&gt;&lt;br&gt;After doing this a few too many times, the light bulb went off and I realized there must be a better way.  I then started to investigate how to use a base form.  SF provided the example. The StandardForm inherits the SF BaseForm, which in turn provides all the SF niceness that we love. Why couldn't I do that myself and add my extra features?  :D&lt;br&gt;&lt;br&gt;So, I coded a base form that added the features mentioned. Now when I need one or more of those features, I just inherit from my base form (which inherits from StandardForm...so I have the SF features too).  &lt;br&gt;&lt;br&gt;When the solution opens, an explanation page is shown that should help you get started.&lt;br&gt;&lt;br&gt;For a savvy .NET developer, this is pretty basic stuff.  However, a lot of us are moving from some other language/paradigm. So I thought I'd offer this up, as it might help to have a practical example of using a base class (plus some generic shared factory methods, how to hook into the SF events (see the OnLoad method)).&lt;br&gt;&lt;br&gt;Of course, all of you savvy, svelte .NET gurus out there could certainly pipe in with suggestions for improvements or trade offs of doing things differently...I'm always learning more!&lt;br&gt;&lt;br&gt;Thanks!&lt;br&gt;Greg  :cool:&lt;br&gt;&lt;br&gt;P.S. You'll need the StrataFrameSample db loaded for this to work.</description><pubDate>Wed, 14 Nov 2007 01:37:13 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>Reporting: Create a typed dataset from Business Objects that can be bound at design time to reports, etc</title><link>http://forum.strataframe.net/Topic11583-26-1.aspx</link><description>Jerome posted this in the [b]Business Objects and Data Access[/b] forum.  I thought I'd repost here, as it is really a very cool sample.&lt;br&gt;&lt;br&gt;[url]http://forum.strataframe.net/Topic8417-6-1.aspx[/url]&lt;br&gt;&lt;br&gt;Thanks Jerome!</description><pubDate>Wed, 19 Sep 2007 11:02:52 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>Change Backcolor of Required Fields on Edit or Add</title><link>http://forum.strataframe.net/Topic10349-26-1.aspx</link><description>I had a request from my users to be able to identify the required fields prior to hitting the save button. Here is a very simple test/sample app that I used to test and debug prior to implementing in production code and it demonstrates how I implemented this request using the sample strataframe data. I hope this will save someone else a little time if they need this functionality in their app.&lt;/P&gt;&lt;P&gt;It seems to work fine with both S.F. controls and Dev Express subclassed I am not sure about Infragistics but it should be ok but dont come crying to me if it doesnt work:hehe:&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Tue, 17 Jul 2007 11:08:38 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>Using Icons at runtime from resource library!</title><link>http://forum.strataframe.net/Topic10267-26-1.aspx</link><description>The following is a solution offered by Ben Chase (SF team) that allows you to use icons at runtime from a resource library rather than loading from disk:&lt;br&gt;[quote]the Image and Icon are completely different... mainly because Icon does not inherit from Image (the file formats are completely different since an Icon can have several different sizes within the file).  So, I would recommend that you add the icons to your project (not as resources, just add them to the project with the "Add Exisiting Item" option) and change their compile option to Embedded Resource (in the properties for the file).  Then, you can use the Icon constructor that accepts a stream to retrieve the embedded resources.  Kinda like this:&lt;br&gt;&lt;br&gt;notifyIcon1.Icon = new Icon(Assembly.GetExecutingAssembly().GetManifestResourceStream("RootNamespace.Folders.FileName"));&lt;br&gt;&lt;br&gt;C# and VB do some different stuff for the name of the resource when it's compiled.  C# uses the root namespace + the folder names separated by "." followed by the filename.  Whereas VB just the root namespace + the filename.  If you ever want to see what resources are available, you can use the Assembly.GetExecutingAssembly().GetManifestResourceNames(); method which will return the names of all of the resources.  Oh, and the names are case-sensitive. &lt;br&gt;&lt;br&gt;But that's probably your best be for retrieving icons from the assembly at runtime.[/quote]</description><pubDate>Fri, 13 Jul 2007 10:01:48 GMT</pubDate><dc:creator>Ben Hayat</dc:creator></item><item><title>Let the samples begin</title><link>http://forum.strataframe.net/Topic10231-26-1.aspx</link><description>This forum has been created to allow developers, like yourself, to add or post samples that may be beneficial to other StrataFrame users.  We appreciate all of your contributions to the forum and have noticed that different samples have been posted within forum threads in the past making it more difficult for future users to find.  This forum allows those samples to be consolidated and reviewed more easily by other StrataFrame users.  Thanks for all of your posts!&lt;/P&gt;&lt;P&gt;Trent</description><pubDate>Thu, 12 Jul 2007 09:18:22 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>