﻿<?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 / Samples and Solutions </title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Fri, 12 Mar 2010 17:15:15 GMT</lastBuildDate><ttl>20</ttl><item><title>Using ExcelHelper Tool to Export Business Object to Excel Document</title><link>http://forum.strataframe.net/Topic25683-17-1.aspx</link><description>&lt;STRONG&gt;Overview&lt;BR&gt;&lt;/STRONG&gt;Another common topic that comes up on the forum is exporting a BO to an Excel spreadhsheet.  And this is one of those tools that you don't need it until you need it.  But once you do, it is extremely handy!  The ExcelHelper uses the Microsoft Jet OLEDB engine to interface with Excel to query and produce the &amp;#100;ocument.  So if you are running on a 64-bit machine, be sure to build the assembly in x86 otherwise it will not work.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;BR&gt;This sample is pretty straight forward.  The business object will first be populated with 100 records and then those records are then exported to an Excel &amp;#100;ocument.  You can see that the code required is minimal and very easy to implement!</description><pubDate>Sun, 31 Jan 2010 19:13:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Executing a Threaded Incremental Search Using a Business Object</title><link>http://forum.strataframe.net/Topic25669-17-1.aspx</link><description>&lt;STRONG&gt;Overview&lt;/STRONG&gt;&lt;BR&gt;It seems that this topic comes up a lot on the forum, so I thought it prudent to go ahead and create a sample showing how to perform an incremental search. &lt;P&gt;So let's start with when this should be used.  It is not uncommon at all on the forum to see when developers are trying to pull back tens or even hundreds of thousands of records to the local client so the end-user can pick them out of a list.  But let's be realistic, unless you are that robot from Short Circuit, there is absolutely no way that someone can deal with that many records at once.  Not only that, it is super slow to retrieve that many records making your end-user even more frustrated with this process.  So the solution...a threaded incremental search.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution&lt;BR&gt;&lt;/STRONG&gt;So the solution to something like this is an incremental search...not just any incremental search, a threaded incremental search.  This presents a fluid user interface to the end-user while presenting the user with only the information they have requested or for which they are looking.&lt;/P&gt;&lt;P&gt;So here are a couple of things that this sample shows:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/f59ac1ee-cb34-4498-88d5-e404.png"&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Using a BackgroundWorker Thread.  To make this sample even more simple, I have used a BackgroundWorker class that comes standard with .NET.  For anyone who is new to threading, this will make this first step a little easier.&lt;BR&gt;&lt;/LI&gt;&lt;LI&gt;Only bring back a limited number of records.  This sample will never bring back more than 100 records.  You can manipulate this number to accommodate your needs, but I recommend never getting above 1000 as this can begin to really degredate performance.  You will see this in the query within the BO by simply adding the &lt;U&gt;&lt;STRONG&gt;TOP 100&lt;/STRONG&gt;&lt;/U&gt; to the query.  This way if the end-user clears out the text field, it doesn't try to bring back every user in the database...that would be bad mojo.&lt;BR&gt;&lt;/LI&gt;&lt;LI&gt;Simple user interface, but solid performance.  You can get more sophisticated on more complex databases, but for this sample it is a very simple query just happening on a thread.  If you have massive databases, then it may be necessary to implement Full-Text Search on the SQL Server (or desired database and equivalent).  Just for reference, we have a drug database that we actually need to query between many different tables and adds up to millions of records...we use a similar approach to this sample, but Full-Text indexes are implement and a Stored Procedure is used.&lt;BR&gt;&lt;/LI&gt;&lt;LI&gt;One final thought.  When testing this sample, I was connecting to a remote SQL Server connection via a VPN at a remote office on limited bandwidth, and the results brought back were immediate and there was no sense of a pause when entering a search string.  This is because a combination of the threading and only bringing back a limited result set.&lt;/LI&gt;&lt;/OL&gt;</description><pubDate>Sun, 31 Jan 2010 10:20:04 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>StrataListView Basics</title><link>http://forum.strataframe.net/Topic24981-17-1.aspx</link><description>This sample is the first in a number of samples to come showing how to use the StrataListView. This sample shows how to manually populate the list but shows a number of examples on how to take advantage of features unique to the StrataListView. At present, this sample is only in C# but will be converted to VB.NET once completed. This should be a good starting point for those wanting to start taking advantage of this new control.&lt;BR&gt;&lt;BR&gt;[b]Requirements:[/b] You must be on version 1.7.0.4 or greater to take advantage of this sample.&lt;BR&gt;[b]Note:[/b] If you need this now, send me a PM and I will give you a link to download the 1.7.0.4 build from a custom location.</description><pubDate>Fri, 23 Oct 2009 11:21:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Web Sample - CSharp</title><link>http://forum.strataframe.net/Topic5109-17-1.aspx</link><description>This StrataFrame installation already includes a VB.NET web sample. There have been a number of requests for the same sample in CSharp. This sample is exactly that! :D This sample will be included in future StrataFrame installations, but for those of you who do not want to wait, here is the CSharp web sample.</description><pubDate>Thu, 07 Dec 2006 20:32:36 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>StrataFlix Sample Application</title><link>http://forum.strataframe.net/Topic18186-17-1.aspx</link><description>This is the first installment of the StrataFlix sample that shows how to create a real-world application using StrataFrame and .NET.  This sample comes with an MDF that can be attached to your SQL Server as well as source in VB.NET and C#.&lt;P&gt;Additionally, this sample shows how to create Custom BBS data sources that can be used for reporting, grids, and any other type of 3rd party control that expects the IBindingList implementation as well as how to create a true object model binding source (i.e. parent, child, grandchild, etc.) all being exposed through a single object entry point.  You will find samples of this in the Reporting assembly (i.e. Movie Profile Report).&lt;/P&gt;&lt;P&gt;There will be a full web application as well as even more added to the client (WinForms) side of the application.  However, at present, this sample will show how to create an application MDI environment and how to plumb an entire application.  This is a great sample to really learn how to create applications using SF and will continue to grow.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How To Setup Sample and Requirements&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;You &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;must&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; be on the most recent version of 1.6.6 beta in order for this sample to work (&lt;A href="http://forum.strataframe.net/FindPost18055.aspx"&gt;http://forum.strataframe.net/FindPost18055.aspx&lt;/A&gt;)&lt;/LI&gt;&lt;LI&gt;Solution is built in VS2008, if you are running VS2005, then you will have to create your own solution and add the projects into that solution manually.  It is recommended to run in VS2008.&lt;/LI&gt;&lt;LI&gt;Once extracted, attach the MDF to a SQL Server&lt;/LI&gt;&lt;LI&gt;Open the desired language source&lt;/LI&gt;&lt;LI&gt;Build the sample&lt;/LI&gt;&lt;LI&gt;At this point you should be running the sample.  &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;The BO Mappings are &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;not&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; yet included as this will have to be part of your StrataFrame database and be part of an install for this sample later down the road.  However, this really isn't necessary in order to run, build, and study the sample in depth.&lt;P&gt;&lt;STRONG&gt;Download now available through the &lt;U&gt;My Account&lt;/U&gt; area!&lt;/STRONG&gt;</description><pubDate>Tue, 29 Jul 2008 10:07:32 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>QueryNotification Services Sample</title><link>http://forum.strataframe.net/Topic16012-17-1.aspx</link><description>This sample shows how to receive query notifications using notification services in SQL Server 2005.  To do this, the following things are required:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;SQL Server 2005&lt;/LI&gt;&lt;LI&gt;Notification services must be installed.  You will see this as a folder within SQL Server Management Studio (Notification Services)&lt;/LI&gt;&lt;LI&gt;Broker Service must be enabled for the database.  If you are using the DDT, just check this in the Database properties.  Otherwise, you can enable this like this:&lt;BR&gt;&lt;BR&gt;ALTER DATABASE StrataFrameSample SET ENABLE_BROKER&lt;BR&gt;&lt;BR&gt;In this example, you will need to manually execute the above command to turn on the broker service for the StrataFrameSample database (not by default).&lt;/LI&gt;&lt;LI&gt;Set the ReceiveQueryNotificationServices property to True on the BO&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Next, you will want to handle the ServerDataChanged event.  This will be raised if there is an error qith the notification or if the query has changed.  If there was an error with the subscription, the Info property will indicate Invalid (in most cases).  If the ServerDataChanged event is not raised immediately after query is called, then it is subscribed.  You can determine this for sure by looking at the queues in SQL Server Management Studio.&lt;/P&gt;&lt;P&gt;Also, when creating queries, wildcards will not work and the schema names must be included in the queries.&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;Won't Work&lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;SELECT * FROM Customers&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;Will Work&lt;BR&gt;&lt;BR&gt;&lt;/STRONG&gt;SELECT cust_LastName FROM dbo.Customers&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How To Use This Sample&lt;BR&gt;&lt;/STRONG&gt;&lt;BR&gt;Simply run two instances of this sample once compiled.  Change the value of the last or first name on one of the forms.  You will then see a message box appear with the notification values and then refresh the dialog with the changes.</description><pubDate>Tue, 29 Apr 2008 22:27:47 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Adding Broken Rules for a Custom Property</title><link>http://forum.strataframe.net/Topic15885-17-1.aspx</link><description>There have been several posts asking about how to create and show a broken rule for a custom field property on a business object.  This sample uses the StrataFrameSample database and adds a custom field property and rules that must be applied to that custom field property.  It also shows how to properly add a BrokenRule for a custom property so that all of the error provider logic will appear.</description><pubDate>Fri, 25 Apr 2008 09:34:46 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Backuping Up and Restoring SQL Server with SMO</title><link>http://forum.strataframe.net/Topic15065-17-1.aspx</link><description>There have been some inquiries as to how to backup and restore SQL Server databases through an application in the field.  The best approach that we have learned for creating a reusable backup solution is to use SMO.  We have a service that runs within our medical application that automatically backs up the end-users database to a different file name each night...since they don't always do this themselves :D&lt;/P&gt;&lt;P&gt;You can modify this logic to backup and restore individual file groups.  But this sample will at least get you started and shows how to backup and restore a single database using SMO.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; You may need to adjust the output folder path and the server settings in order to get this sample to work for you.</description><pubDate>Thu, 20 Mar 2008 10:41:20 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>XmlBasics Validation Key Sample</title><link>http://forum.strataframe.net/Topic13096-17-1.aspx</link><description>StrataFrame has an XmlBasics class that helps in the creation, opening, encryption, and writing of Xml files.  One of these features also includes the ability to use a validation key which can be an added level of encryption.  An example use of this would be to use a has that has a checksum of the hardware on the computer or a MAC address to prevent an XML file from simply being copied to another computer for another user to take advantage of.  This sample show how to use the validation key as part of the XmlBasics class.</description><pubDate>Thu, 20 Dec 2007 10:22:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Talking to a Stand Alone FoxPro Table</title><link>http://forum.strataframe.net/Topic12002-17-1.aspx</link><description>This sample shows how to talk to a stand alone FoxPro table through a business object.  The only trick that is worth mentioning here is that if you have a stand alone table that does not have a primary key and you plan to add new records, then you will want to open the BO Mapper, right-click the BO, and then click properties.  Once in there, override the primary key and specify which field will be the PK.  This will allow records to be inserted into the free-table.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/04998c83-b9c0-48f0-88fb-2350.png"&gt;</description><pubDate>Mon, 15 Oct 2007 14:24:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>.NET Application with embedded VFP EXE</title><link>http://forum.strataframe.net/Topic5903-17-1.aspx</link><description>There are many developers making the move from Visual FoxPro to .NET.  During this process many times, there is the need to perform the migration in steps rather than all at once.  This entails that the .NET environment and the legacy VFP application operate simultaneously.  This sounds like an impossible feat, but can be done with relative ease using StrataFrame and the techniques found within this sample. &lt;P&gt;This sample shows how to run both .NET and VFP forms within the same MDI environment.  This sample is intended to be a starting point giving you many ideas and a foundation on which to build this platform.&lt;/P&gt;&lt;P&gt;Keep in mind that you are going to have to make some minor changes to your VFP environment in order to make this entirely successful.  These changes include removing menus and status bars and creating a UDP class (included in the sample) that creates the line of communication between .NET and VFP.  Additionally, you will have to make a very simple change to your base form (also shown in the sample).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Requirements For Sample&lt;BR&gt;&lt;/STRONG&gt;There are several requirements that must be met before running this sample.  First, StrataFrame must be installed.  Below is a list of the additional components for the VFP side.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Visual FoxPro 8 or 9&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://www.dart.com/ptwsk.aspx"&gt;Dart PowerTCP UDP ActiveX Control &lt;/A&gt;(You can download their trial activeX version for testing)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Last, when running (or rebuilding the VFP source), the netvfpsample.exe file (VFP app) must reside in the same location as the .NET program.  You can see how the VFP app is automatically launched within the EnsureLegacyApp() method in the MyMainForm source in .NET.</description><pubDate>Wed, 17 Jan 2007 12:42:20 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>CSharp Samples</title><link>http://forum.strataframe.net/Topic5397-17-1.aspx</link><description>This download contains 9 CSharp samples and the tutorial solutions in CSharp format.  These samples and more will be included in the 1.5.2 update that will be made available in January.  The following samples are included in this download:&lt;UL&gt;&lt;LI&gt;Advanced ListView Population&lt;/LI&gt;&lt;LI&gt;BrowseDialog Sample&lt;/LI&gt;&lt;LI&gt;ChildDialogForm Sample&lt;/LI&gt;&lt;LI&gt;Database Installer Sample (Shows how to programmatically deploy a DDT package...including with an installer class to be used with install applications)&lt;/LI&gt;&lt;LI&gt;3rd Party Data Binding&lt;/LI&gt;&lt;LI&gt;Themed Container Sample&lt;/LI&gt;&lt;LI&gt;StrataFrame UI Controls Samples&lt;/LI&gt;&lt;LI&gt;Web Application Sample&lt;/LI&gt;&lt;LI&gt;Tutorial in C# Format&lt;/LI&gt;&lt;/UL&gt;</description><pubDate>Tue, 19 Dec 2006 11:40:59 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>3rd Party Data Binding Video</title><link>http://forum.strataframe.net/Topic4726-17-1.aspx</link><description>Attached to this post is a video that goes along with the 3rd Party Data Binding sample that is installed with StrataFrame.  To open the sample, go to MicroFour StrataFrame -&amp;gt; Samples -&amp;gt; [Preferred language] -&amp;gt; 3rd Party Data Binding&lt;/P&gt;&lt;P&gt;This video and sample shows how to take a third party control or a custom control and add native StrataFrame data binding using the IBusinessBindable interface.</description><pubDate>Tue, 21 Nov 2006 21:50:44 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>Database Installer Sample</title><link>http://forum.strataframe.net/Topic4635-17-1.aspx</link><description>This sample shows how to deploy a Database Deployment Toolkit package three different ways.  This includes the meta-data as well as any deployment data packages within the DDT package.&lt;OL&gt;&lt;LI&gt;Using the pre-built dialogs seen within the DDT itself&lt;/LI&gt;&lt;LI&gt;Creating custom dialogs using the DatabaseMigrator class&lt;/LI&gt;&lt;LI&gt;Integrating with an MSI Installer class&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;To implement the MSI Installer class, you will have to deploy the DLL assembly and call it through an MSI installer such as InstallAware or just the standard .NET setup projects.</description><pubDate>Sun, 19 Nov 2006 14:36:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>