<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Jesper's blog about integrating with Office Accounting</title><subtitle type="html">This blog discusses how to write applications that integrate with Office Accounting.</subtitle><id>http://blogs.msdn.com/jesperbirkolsen/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/jesperbirkolsen/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2006-10-23T16:54:00Z</updated><entry><title>Moving the company data to another machine</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2007/03/06/moving-the-company-data-to-another-machine.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2007/03/06/moving-the-company-data-to-another-machine.aspx</id><published>2007-03-06T21:51:00Z</published><updated>2007-03-06T21:51:00Z</updated><content type="html">&lt;P&gt;This is a question that comes up a lot in the news groups.&lt;/P&gt;
&lt;P&gt;"Why&amp;nbsp;can I not&amp;nbsp;restore the company on a new machine or after installing Vista?" OR "Why can't I open the company with the old company file?"&lt;/P&gt;
&lt;P&gt;Depending on the scenario you get an error "&lt;FONT size=2&gt;&lt;EM&gt;This operation can only be performed while connected to a company on a local machine.&lt;/EM&gt;&lt;/FONT&gt;" or perhaps&amp;nbsp;"&lt;FONT size=2&gt;&lt;EM&gt;Current version of the accounting application does not support this operation.&lt;/EM&gt;&lt;/FONT&gt;".&lt;/P&gt;
&lt;P&gt;The issue is that the company file (sbc-file) is really just a shortcut pointing to the database and computer that stores the actual data. So if you resuse the sbc-file when doing a restore on a new computer or when the computer name has changed after installing a new operating system, the file will still be pointing to the old computer. The error messages are because you cannot restore to a&amp;nbsp;different computer than the one you are currently logged on to, or when you are using the Express version which does not support remote operations.&lt;/P&gt;
&lt;P&gt;The solution to this is easy - you can edit the computer name in the sbc-file or in case of restore, simply enter a new sbc-file name in restore dialog instead of using the existing name.&lt;/P&gt;
&lt;P&gt;This is what a company file looks like when you edit it in Notepad:&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; database=sampleservicecompany&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; server=mycomputer\MSSMLBIZ,5356&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1819842" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author></entry><entry><title>Max number of users?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2006/11/08/max-number-of-users.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2006/11/08/max-number-of-users.aspx</id><published>2006-11-08T21:21:00Z</published><updated>2006-11-08T21:21:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;This topic came up a lot in SBA 2006 and I see it still causes some misunderstandings in places. So I thought I'd blog about it here and link to it in future news group postings.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Times New Roman" size=3&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;BR&gt;There is no preset limit to the number of users in Office Accounting - concurrent or otherwise.&lt;BR&gt;The old MSDE (used by SBA 2006) used to have a built-in performance degration when more than 5 concurrent connections were used (concurrent workload governor - a performance throttle). Note that even that did NOT translate into a maximum number of users - you could have an unlimited number of users and only if more than 5 just happened to use a connection at the exact same time would it result in a performance degration.&lt;BR&gt;But there is no such limitation in SQL Express 2005 - instead they have created other limitations like; never use more than one CPU, max use 1Gb RAM, and max size of each database (4Gb).&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;BR&gt;Here's a link to a page explaining the limits of SQL Express 2005 : &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms165672.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms165672.aspx"&gt;&lt;U&gt;&lt;FONT face="Times New Roman" size=3&gt;http://msdn2.microsoft.com/en-us/library/ms165672.aspx&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;BR&gt;&lt;FONT face="Times New Roman" size=3&gt;If you want to overcome those limitations you can easily use the full SQL Server 2005 instead.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;BR&gt;In fact Office Accounting should scale very well since it relies on Sql Server - but you might find that if your company grows to more than 25 employees it could require more advanced accounting software with more features than Office Accounting.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1038452" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author><category term="users" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/users/default.aspx" /><category term="SQL Express" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/SQL+Express/default.aspx" /><category term="multiuser" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/multiuser/default.aspx" /></entry><entry><title>Catching exceptions from the loader</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2006/11/03/catching-exceptions-from-the-loader.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2006/11/03/catching-exceptions-from-the-loader.aspx</id><published>2006-11-03T20:27:00Z</published><updated>2006-11-03T20:27:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;The Loader implements a LoaderException class derived from ApplicationException similar to the way that SBA implements SmallBusinessExceptions.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;Since the Loader is using reflection to&amp;nbsp;call methods on the SBA objects themselves (like &lt;I style="mso-bidi-font-style: normal"&gt;Logon&lt;/I&gt; and &lt;I style="mso-bidi-font-style: normal"&gt;Initialize&lt;/I&gt;) it can throw both LoaderExceptions and TargetInvokationExceptions which wraps an inner exception as SmallBusinessExceptions.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;Since calling applications should not be binding statically to the Loader assembly or SBA assemblies but only to the interface assemblies, they will need to catch ApplicationExceptions when using the Loader and then type cast it to ILoaderExceptions. In addition a calling application should catch TargetInvokationExceptions and check if the InnerException property is ISmallBusinessException thrown from the SDK.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt"&gt;&lt;FONT face="Times New Roman" size=3&gt;Here's an example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ISmallBusinessInstance&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; smallBusinessInstance;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IFormsFactory&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; formsfactory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;try&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; 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: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;ISbaObjects&lt;/SPAN&gt; sbaObjects = loader.GetSbaObjects(configurationFile);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;smallBusinessInstance = sbaObjects.SmallBusinessInstance &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ISmallBusinessInstance&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;formsFactory = sbaObjects.FormsFactory &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;IFormsFactory&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; 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: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;catch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (&lt;SPAN style="COLOR: teal"&gt;ApplicationException&lt;/SPAN&gt; exception)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; 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: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (exception &lt;SPAN style="COLOR: blue"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ILoaderException&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Handle LoaderException&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;catch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (&lt;SPAN style="COLOR: teal"&gt;TargetInvokationException&lt;/SPAN&gt; exception)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; 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: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (exception.InnerException &lt;SPAN style="COLOR: blue"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ISmallBusinessException&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Handle SmallBusinessException&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;throw&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;}&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt" mce_keep="true"&gt;Notice that I use the "throw" here in order to not catch and hide exceptions I don't handle. Depending on your application that is often the best practise since your application cannot recover from system level exceptions anyway. If you catch-and-eat all exceptions you're basically in an unknown state after this code because you don't know if a serious exception like OutOfMemoryException was thrown - it would mean that the code would run out of memory at a random later stage (like when you later create a handle to a&amp;nbsp;control)&amp;nbsp;and you wouldn't know why.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt" mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=943486" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author><category term="Loader" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Loader/default.aspx" /><category term="integration" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/integration/default.aspx" /><category term="exceptions" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/exceptions/default.aspx" /></entry><entry><title>What do you get when using the Loader</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/27/what-do-you-get-when-using-the-loader.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/27/what-do-you-get-when-using-the-loader.aspx</id><published>2006-10-28T00:28:00Z</published><updated>2006-10-28T00:28:00Z</updated><content type="html">&lt;P&gt;Why use the Loader at all?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well - the Loader together with the overall versioning story for SBA/Office Accounting is designed to make integration as smooth as possible and take away the big hurdles of requiring external applications to control and implement their own versioning story.&lt;/P&gt;
&lt;P&gt;In SBA 2006 you had to find the install folder for SBA in order to use a particular version AND you had to verify that the database was the correct version for those assemblies. &lt;/P&gt;
&lt;P&gt;But with Office Accounting you can write an external application without having to worry about what assemblies to load for a given company/database and what interfaces to use.&lt;/P&gt;
&lt;P&gt;The external application simply binds to the desired version of the SBA interfaces (usually the latest) and all future versions of Office Accounting will always implement these interfaces (and new future interfaces). The Loader will then load the correct version of the assemblies needed to use a given database and return the necessary SBA objects like FormsFactory, SmallBusinessInstance, &amp;amp; ReportsEngine.&lt;/P&gt;
&lt;P&gt;You can write an application that works with SBA 2006 and be sure it also works with all future versions of Office Accounting without having to re-release the application to your customers when a new version of Office Accounting is released.&lt;/P&gt;
&lt;P&gt;In the following blog entries I'll go over the basics of using the Loader beginning with how to get the Loader and the SBA objects and continuing with how to launch forms and reports and save SDK objects.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=884486" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author><category term="Loader" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Loader/default.aspx" /><category term="ISV" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/ISV/default.aspx" /><category term="integration" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/integration/default.aspx" /></entry><entry><title>Getting the SBA objects</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/24/getting-the-sba-objects.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/24/getting-the-sba-objects.aspx</id><published>2006-10-24T21:50:00Z</published><updated>2006-10-24T21:50:00Z</updated><content type="html">&lt;P&gt;The loader interface provides a method for retrieving the SmallBusinessInstance, FormsFactory, and ReportEngine for a given database.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ISbaObjects&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; GetSbaObjects(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; configurationFile);&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The method also has overloads that take a &lt;I style="mso-bidi-font-style: normal"&gt;configuration&lt;/I&gt;-object or the database and server name. The calling application will call the loader to get the SBA objects like this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt 9pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ISbaObjects&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; sbaObjects = loader.GetSbaObjects(configurationFile);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Where configurationFile is the full path to a valid sbc-file.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SbaObjects class contains properties for the SmallBusinessInstance, FormsFactory, and ReportEngine. The reason this class exists is that it will abstract calling applications from the internal implementation of the SBA objects – for instance in order to use the SmallBusinessInstance a &lt;I style="mso-bidi-font-style: normal"&gt;Logon&lt;/I&gt; method must be called and in order to use the FormsFactory a call to an &lt;I style="mso-bidi-font-style: normal"&gt;Initialize&lt;/I&gt; method has to be made. These calls are made internally in the SbaObjects class and calling applications are abstracted from knowing about them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The loader is not strongly bound to any version of SBA and returns the objects directly without type casting them. The calling application must type-check and cast the objects appropriately like this:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Get the SmallBusinessInstance for this database&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;object&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; smallBusinessInstance = sbaObjects.SmallBusinessInstance;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;if&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (smallBusinessInstance &lt;SPAN style="COLOR: blue"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ISmallBusinessInstance&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Do V1 stuff here&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;else&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (smallBusinessInstance &lt;SPAN style="COLOR: blue"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ISmallBusinessInstanceV2&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Do V2 stuff here&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Get FormsFactory for this database&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;object&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; formsFactory = sbaObjects.FormsFactory;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;if&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; (formsFactory &lt;SPAN style="COLOR: blue"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;IFormsFactory&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Do V1 stuff here&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;else&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (formsFactory &lt;SPAN style="COLOR: blue"&gt;is&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;IFormsFactoryV2&lt;/SPAN&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// Do V2 stuff here&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; 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;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IReportEngineV2&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; reportEngine = sbaObjects.ReportEngine &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;IReportEngineV2&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Note that the ReportEngine is a V2 feature – calling applications will need to handle the LoaderException that is thrown when trying to get this object for a database version that doesn’t support it – i.e. when trying to get a ReportEngine when connecting to a V1 database.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=869965" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author><category term="Loader" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Loader/default.aspx" /><category term="SBA objects" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/SBA+objects/default.aspx" /><category term="ISbaObjects" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/ISbaObjects/default.aspx" /></entry><entry><title>How to get the Loader for SBA</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/24/how-to-get-the-loader-for-sba.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/24/how-to-get-the-loader-for-sba.aspx</id><published>2006-10-24T21:34:00Z</published><updated>2006-10-24T21:34:00Z</updated><content type="html">&lt;P&gt;The Loader is installed as a separate msi with Office Accounting. The Loader assemblies are installed into GAC including the interfaces.&lt;/P&gt;
&lt;P&gt;Any external application using the Loader should bind to the interface assembly "ILoader.dll". An external application should &lt;STRONG&gt;never bind to the actual implementation assemblies&lt;/STRONG&gt;, neither for the Loader or any other SBA assemblies.&lt;/P&gt;
&lt;P&gt;Using reflection the external application can then instantiate an instance of the Loader class and cast it to the ILoader type defined in the interface assembly.&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 6pt 0in 0pt 9.35pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Load the assembly that contains the loader object&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 6pt 9.35pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Assembly&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; loaderAssembly = &lt;SPAN style="COLOR: teal"&gt;Assembly&lt;/SPAN&gt;.Load(&lt;SPAN style="COLOR: maroon"&gt;"Loader, Version=2.0.5201.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 9.35pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;// Create an instance of the loader&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; 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: 0in 0in 6pt 9.35pt; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;ILoader&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; loader = loaderAssembly.CreateInstance(&lt;SPAN style="COLOR: maroon"&gt;"Loader"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;false&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;BindingFlags&lt;/SPAN&gt;.CreateInstance, &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;, &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;) &lt;SPAN style="COLOR: blue"&gt;as&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ILoader&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;With the above two lines of code you now have an instance of the Loader class which can be used to retrieve the SBA objects that can launch forms, work with SDK objects, and launch reports.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=869948" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author><category term="SBA" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/SBA/default.aspx" /><category term="Loader" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Loader/default.aspx" /></entry><entry><title>Welcome to my blog for ISVs wanting to integrate with Office Accounting</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/23/welcome-to-my-new-blog-for-isvs-wanting-to-integrate-with-office-accounting.aspx" /><id>http://blogs.msdn.com/jesperbirkolsen/archive/2006/10/23/welcome-to-my-new-blog-for-isvs-wanting-to-integrate-with-office-accounting.aspx</id><published>2006-10-24T02:54:00Z</published><updated>2006-10-24T02:54:00Z</updated><content type="html">&lt;P&gt;In this blog I will write about integrating external applications with Office Accounting.&lt;/P&gt;
&lt;P&gt;I have worked on SBA 2006 and now Office Accounting 2007 since the beginning and one project I was fortunate enough to work on&amp;nbsp;was the design and implementation of&amp;nbsp;the new Loader for SBA.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=866328" width="1" height="1"&gt;</content><author><name>Jesper Birk Olsen</name><uri>http://blogs.msdn.com/members/Jesper+Birk+Olsen.aspx</uri></author><category term="SBA" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/SBA/default.aspx" /><category term="Addins" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Addins/default.aspx" /><category term="Loader" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Loader/default.aspx" /><category term="Accounting" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/Accounting/default.aspx" /><category term="ISV" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/ISV/default.aspx" /><category term="integration" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/integration/default.aspx" /><category term="interface" scheme="http://blogs.msdn.com/jesperbirkolsen/archive/tags/interface/default.aspx" /></entry></feed>