<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>derek:b3studios</title>
	<atom:link href="http://www.b3studios.com/derek/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.b3studios.com/derek</link>
	<description>Yo! I'm Derek Anderson, a Software Analyst and Developer. I like to blab about .NET and Mono!</description>
	<pubDate>Sat, 12 Dec 2009 02:49:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Dynamic References in an Access Application.</title>
		<link>http://www.b3studios.com/derek/?p=161</link>
		<comments>http://www.b3studios.com/derek/?p=161#comments</comments>
		<pubDate>Sat, 12 Dec 2009 02:09:41 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=161</guid>
		<description><![CDATA[So you have an Access database application. Along with this application, your company uses multiple versions of Office, and you use Excel, Word, Outlook - or any other Reference - where versioning might be a problem.
So how do you get your app to work flawlessly on Bob&#8217;s computer with Office 2000 and Mary&#8217;s computer with [...]]]></description>
			<content:encoded><![CDATA[<p>So you have an Access database application. Along with this application, your company uses multiple versions of Office, and you use Excel, Word, Outlook - or any other Reference - where versioning might be a problem.</p>
<p>So how do you get your app to work flawlessly on Bob&#8217;s computer with Office 2000 and Mary&#8217;s computer with Office 2007? A little trick called VBE. Visual Basic Extensions! We are going to loop through our projects references, when we encounter either a reference we know is Word, Excel or Outlook - we&#8217;re going to remove it, and re-add the latest version. We don&#8217;t need to worry if the reference is broken or not, since removing and re-adding costs very little.</p>
<blockquote><p>We identify references by using a GUID. VBA has a GUID for each reference. Even if you are using Excel 2003 or Excel 2007 - the GUID remains the same. What changes is the Major and Minor versions when loading them via VBA code. However, by specifying the versions as 0, 0 we get to force VBA to load the LATEST version. Thus making our code dynamically load whichever version is installed on the target machine.</p></blockquote>
<p>For now, I&#8217;m only going to worry about three GUIDs. Word, Outlook and Excel. I&#8217;ll write later on how to retrieve the GUID ids, but if your clever the following code is enough for you to work from. With our new found knowledge of what we&#8217;re doing, how do we do it? Here are two functions that will help you put the mystery together.</p>
<p>To remove references we may have to these three COM objects.<br />
<code>Function RemoveOfficeReferences()<br />
    Dim chkRef As Reference<br />
    For Each chkRef In Application.References<br />
       Select Case chkRef.Guid<br />
       Case "{00062FFF-0000-0000-C000-000000000046}"<br />
        Application.References.Remove chkRef<br />
       Case "{00020813-0000-0000-C000-000000000046}"<br />
        Application.References.Remove chkRef<br />
       Case "{00020905-0000-0000-C000-000000000046}"<br />
        Application.References.Remove chkRef<br />
       End Select<br />
    Next<br />
End Function<br />
</code></p>
<p>To add references we need for these three COM objects.<br />
<code><br />
Function AddOfficeReferences()<br />
On Error GoTo errhandler<br />
'this bit of code will add the references the first part is the<br />
'Function is .AddFromGuid(Guid, Major, Minor)<br />
'Leave the Major and Minor @0 to retrieve latest version.</p>
<p>'add outlook<br />
Application.VBE.ActiveVBProject.References _<br />
.AddFromGuid "{00062FFF-0000-0000-C000-000000000046}", 0, 0<br />
'GUID for Outlook</p>
<p>'add excel<br />
Application.VBE.ActiveVBProject.References _<br />
.AddFromGuid "{00020813-0000-0000-C000-000000000046}", 0, 0<br />
'GUID for Excel</p>
<p>'add word<br />
Application.VBE.ActiveVBProject.References _<br />
.AddFromGuid "{00020905-0000-0000-C000-000000000046}", 0, 0<br />
'GUID for word</p>
<p>'add access<br />
'Application.VBE.ActiveVBProject.References _<br />
'.AddFromGuid "{00020430-0000-0000-C000-000000000046}", 0, 0<br />
'GUID for access</p>
<p>errhandler:<br />
If Err.Number <> 0 Then<br />
    MsgBox &#8220;could not link reference:&#8221; &#038; Err.Description<br />
    Resume Next<br />
End If</p>
<p>End Function</code></p>
<p>These are just samples, there are much more eloquent ways to do the above, but this gives you an idea! Now go out, and develop without fear of version issues!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=161&amp;t=Dynamic+References+in+an+Access+Application.&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=161&amp;title=Dynamic+References+in+an+Access+Application.&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=161</wfw:commentRss>
		</item>
		<item>
		<title>Access 2007 .Transfer bug, the fun&#8230;&#8230;.</title>
		<link>http://www.b3studios.com/derek/?p=159</link>
		<comments>http://www.b3studios.com/derek/?p=159#comments</comments>
		<pubDate>Fri, 11 Dec 2009 01:46:17 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[.TransferSpreadsheet]]></category>

		<category><![CDATA[2007]]></category>

		<category><![CDATA[access]]></category>

		<category><![CDATA[Access 2007]]></category>

		<category><![CDATA[DoCmd.TransferSpreadsheet]]></category>

		<category><![CDATA[DoCmd.TransferText]]></category>

		<category><![CDATA[TransferText]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=159</guid>
		<description><![CDATA[I just spent 20 hours of my life, debugging one hell of a problem in Access 2007. I thought I would share this with you, incase anyone else maybe tearing their hair out - and the problem is similar.
Here is the setup. Access 2007 Database - Upsized/Migrated to SQL Server (2008 in my case). Everything [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent 20 hours of my life, debugging one hell of a problem in Access 2007. I thought I would share this with you, incase anyone else maybe tearing their hair out - and the problem is similar.</p>
<p>Here is the setup. Access 2007 Database - Upsized/Migrated to SQL Server (2008 in my case). Everything worked fine before, exporting a Text File, or a Spreadsheet of the data. Now when you click on the button - It crashes the application. The stranger part - it doesn&#8217;t happen EVERY TIME!? </p>
<p>No in fact this problem, doesn&#8217;t even happen if you use the OutPutTo function instead&#8230;&#8230;.</p>
<p>So after, all the tinkering eliminating the much more obvious offenders, what was the little damn stinker?! A UnionQuery&#8230;. A pesky UnionQuery was bombing out the .Transfer. It worked fine when I ran it, Access didn&#8217;t complain about it, nor did SQL server. </p>
<p>What I found was a pesky little ORDER BY on one of the UNION members. This trashed the .Transfer for some reason. SO there you have it. Remove your ORDER BY in one of your UNION statements, and life should be grand again!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=159&amp;t=Access+2007+.Transfer+bug%2C+the+fun.......&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=159&amp;title=Access+2007+.Transfer+bug%2C+the+fun.......&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=159</wfw:commentRss>
		</item>
		<item>
		<title>Unlimited Data Plan from T-Mobile works with iPhone for 9.99!</title>
		<link>http://www.b3studios.com/derek/?p=155</link>
		<comments>http://www.b3studios.com/derek/?p=155#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:37:31 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[5.99]]></category>

		<category><![CDATA[access]]></category>

		<category><![CDATA[cell]]></category>

		<category><![CDATA[cellular]]></category>

		<category><![CDATA[data]]></category>

		<category><![CDATA[i]]></category>

		<category><![CDATA[internet]]></category>

		<category><![CDATA[iphone]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[phone]]></category>

		<category><![CDATA[shadow]]></category>

		<category><![CDATA[smart]]></category>

		<category><![CDATA[smartphone]]></category>

		<category><![CDATA[t]]></category>

		<category><![CDATA[t-mobile]]></category>

		<category><![CDATA[t-zones]]></category>

		<category><![CDATA[tmobile]]></category>

		<category><![CDATA[unlimited]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[windows]]></category>

		<category><![CDATA[wm]]></category>

		<category><![CDATA[zones]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=155</guid>
		<description><![CDATA[So you don&#8217;t need 3G? You want email, some light web, google maps, pandora, low quality youtube, and iheartradio (or mobile streaming radio). Then T-Mobile&#8217;s Unlimited Edge plan is perfect for you.
Most people are tearing their hair out after giving up their much loved T-Zones by mistake, or for temporarily switching a phone, where T-Zones [...]]]></description>
			<content:encoded><![CDATA[<p>So you don&#8217;t need 3G? You want email, some light web, google maps, pandora, low quality youtube, and iheartradio (or mobile streaming radio). Then T-Mobile&#8217;s Unlimited Edge plan is perfect for you.</p>
<p>Most people are tearing their hair out after giving up their much loved T-Zones by mistake, or for temporarily switching a phone, where T-Zones wouldn&#8217;t work correctly. Then you wanted to go back, and viola it was no longer an option. Most people tried the Web2Go for 9.99 and got the not compatible screenie, yikes! WTF?! </p>
<p>Behold T-Mobile Internet for Phones. 9.99 for 100 MBs, yup that sucks. But as everyone knows, if T-Mobile doesn&#8217;t have a plan for your phone, this is what your going to be offered. However, if you do a little digging, you will soon find another 9.99 Data Plan, with UNLIMITED access. This plan uses the Internet2.VoiceStream.Com APN for access. </p>
<p>The plan name is the T-Mobile Unlimited Shadow data access plan. Thats right, the T-Mobile Shadow. A WINDOWS SmartPhone, with a Fav 5s home screen. Since this phone is really not pushed in to the SmartPhone market, I guess T-Mobile thought no one would notice this 9.99 UNLIMITED SMARTPHONE dataplan floating around.</p>
<p>How can you get it? The easiest way, is to simply log into your account, @ T-Mobile.com, select the &#8220;This is Not my Phone&#8221; option, and switch your phone to a T-Mobile Shadow. Go to Service Options, and viola 9.99 unlimited shadow data plan is now available to be added to your plan! </p>
<p>Sure its $4 more, but it beats whining, pleading, and endless calls to get your T-Zones back, plus it works!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=155&amp;t=Unlimited+Data+Plan+from+T-Mobile+works+with+iPhone+for+9.99%21&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=155&amp;title=Unlimited+Data+Plan+from+T-Mobile+works+with+iPhone+for+9.99%21&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=155</wfw:commentRss>
		</item>
		<item>
		<title>WCF and WSDL and HTTPS and WinForms</title>
		<link>http://www.b3studios.com/derek/?p=150</link>
		<comments>http://www.b3studios.com/derek/?p=150#comments</comments>
		<pubDate>Fri, 21 Aug 2009 20:32:27 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[.net]]></category>

		<category><![CDATA[VB.NET]]></category>

		<category><![CDATA[c#]]></category>

		<category><![CDATA[c#.net]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[https]]></category>

		<category><![CDATA[vb]]></category>

		<category><![CDATA[wcf]]></category>

		<category><![CDATA[winforms]]></category>

		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=150</guid>
		<description><![CDATA[So everytime I bring a post to this blog, I try to make sure it something that other people don&#8217;t just post willy nilly. So here is an interesting problem I had the other day, and the series of searches and trials, and time spent to bring this to some poor soul looking for an [...]]]></description>
			<content:encoded><![CDATA[<p>So everytime I bring a post to this blog, I try to make sure it something that other people don&#8217;t just post willy nilly. So here is an interesting problem I had the other day, and the series of searches and trials, and time spent to bring this to some poor soul looking for an answer.</p>
<p><strong>The problem:</strong> You are using .NET 3.0 or 3.5, and you need to connect to an older Web Service. Specifically, you need to connect to a WSDL that is secured.  The WebService address could be something such as: https://www.here.com/service.wsdl</p>
<p>When you use Visual Studio to make this connection it does many things incorrectly. The big error you are likely to encounter, less any specifics about the WSDL you are trying to connect to is:</p>
<blockquote><p>Type TEXT/XML is not valid, Type Application/XML was expected.</p></blockquote>
<p>In one easy little new Binding, we can make this all go away. For the novices here is a detailed explanation.</p>
<p>Take this custom binding here</p>
<p><code><br />
<customBinding><br />
            <binding name="Soap11AddressingBinding" ><br />
              <textMessageEncoding messageVersion="Soap11WSAddressing10" /><br />
              <httpsTransport authenticationScheme="Basic" realm="rasmasRealm"  /><br />
            </binding><br />
          </customBinding><br />
</code></p>
<p>Stick it into your Bindings section in App.Config and point the EndPoint to use that binding. You should be off and running in NO TIME!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=150&amp;t=WCF+and+WSDL+and+HTTPS+and+WinForms&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=150&amp;title=WCF+and+WSDL+and+HTTPS+and+WinForms&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=150</wfw:commentRss>
		</item>
		<item>
		<title>Access 2007 , Tab Control , Catch a Tab Click. How?!</title>
		<link>http://www.b3studios.com/derek/?p=147</link>
		<comments>http://www.b3studios.com/derek/?p=147#comments</comments>
		<pubDate>Fri, 15 May 2009 17:12:22 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=147</guid>
		<description><![CDATA[Ok so you are using Access 2007 for this example. You pull out a Tab Control, and want to fire an event when the tab is clicked. Ok easy, I&#8217;ll just add a method to the TabControl Click event right? But you discover it doesn&#8217;t work.. Why isn&#8217;t it working!? Well thats the problem, the [...]]]></description>
			<content:encoded><![CDATA[<p>Ok so you are using Access 2007 for this example. You pull out a Tab Control, and want to fire an event when the tab is clicked. Ok easy, I&#8217;ll just add a method to the TabControl Click event right? But you discover it doesn&#8217;t work.. Why isn&#8217;t it working!? Well thats the problem, the tab control click event only works when you click the tab control, it doesn&#8217;t work when you click the actual tabs.</p>
<p>Well here is the solution, and only a one big limit. If you have a Tab Page, it SHOULD have a control on it. This will break depending on the situation if a Tab Page is blank, only because this specific event may NOT be fired.</p>
<p><code><br />
Dim pasttab As Integer<br />
Private Sub Detail_Paint()<br />
   'the detail paint will be fired, when the tab is changed<br />
   Dim activetab As Integer<br />
   activetab = Me.TabCtl0.Value<br />
   If Not activetab = pasttab Then<br />
        pasttab = activetab<br />
        'put code for the fired event of a 'Click here</p>
<p>   End If<br />
End Sub<br />
</code></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=147&amp;t=Access+2007+%2C+Tab+Control+%2C+Catch+a+Tab+Click.+How%3F%21&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=147&amp;title=Access+2007+%2C+Tab+Control+%2C+Catch+a+Tab+Click.+How%3F%21&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=147</wfw:commentRss>
		</item>
		<item>
		<title>Mono Basic 2.4 Debian/Ubuntu build.</title>
		<link>http://www.b3studios.com/derek/?p=138</link>
		<comments>http://www.b3studios.com/derek/?p=138#comments</comments>
		<pubDate>Thu, 02 Apr 2009 18:44:11 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[VB.NET]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[basic]]></category>

		<category><![CDATA[debian]]></category>

		<category><![CDATA[intrepid]]></category>

		<category><![CDATA[mono]]></category>

		<category><![CDATA[mono-basic]]></category>

		<category><![CDATA[mono-develop]]></category>

		<category><![CDATA[mono-develop-basic]]></category>

		<category><![CDATA[monobasic]]></category>

		<category><![CDATA[monodevelop]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=138</guid>
		<description><![CDATA[Mono is the Open Source .NET framework for Linux and Mac and Windows. If you have been looking for Mono Basic 2.4 package to install on Debian/Ubuntu since apparently there is no good mono 2.0 or VB.NET support, here you go! x86, and x86_64 builds provided, with original package sources.

X86
Get the original RPM Here built [...]]]></description>
			<content:encoded><![CDATA[<p>Mono is the Open Source .NET framework for Linux and Mac and Windows. If you have been looking for Mono Basic 2.4 package to install on Debian/Ubuntu since apparently there is no good mono 2.0 or VB.NET support, here you go! x86, and x86_64 builds provided, with original package sources.</p>
<p><center></p>
<p><strong>X86</strong><br />
Get the original RPM Here built in the Fedora Channels here</p>
<p><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-17ca5150ff6e5447.skydrive.live.com/embedrowdetail.aspx/.Public/mono-basic-2.4-1.RC1.fc11.i586.rpm"></iframe></p>
<p>Get the Alien rebuild for Debian/Ubuntu here</p>
<p><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-17ca5150ff6e5447.skydrive.live.com/embedrowdetail.aspx/.Public/mono-basic%7C_2.4-1.RC1%7C_i386.deb"></iframe></p>
<p><strong>X86_64</strong></p>
<p>Get the original RPM Here built in the Fedora Channels here</p>
<p><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-17ca5150ff6e5447.skydrive.live.com/embedrowdetail.aspx/.Public/mono-basic-2.4-1.RC1.fc11.x86%7C_64.rpm"></iframe></p>
<p>Get the Alien rebuild for Debian/Ubuntu here</p>
<p><iframe scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:240px;height:66px;margin:3px;padding:0;border:1px solid #dde5e9;background-color:#ffffff;" src="http://cid-17ca5150ff6e5447.skydrive.live.com/embedrowdetail.aspx/.Public/mono-basic%7C_2.4-RC1%7C_x86%7C_64.deb"></iframe></center></p>
<p>Leave any questions in the comments.</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=138&amp;t=Mono+Basic+2.4+Debian%2FUbuntu+build.&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=138&amp;title=Mono+Basic+2.4+Debian%2FUbuntu+build.&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=138</wfw:commentRss>
		</item>
		<item>
		<title>get a free logo!</title>
		<link>http://www.b3studios.com/derek/?p=136</link>
		<comments>http://www.b3studios.com/derek/?p=136#comments</comments>
		<pubDate>Wed, 04 Mar 2009 19:19:31 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=136</guid>
		<description><![CDATA[You can get a free logo here! Custom Logo Design
  ]]></description>
			<content:encoded><![CDATA[<p>You can get a free logo here! <a href="http://www.mycustomlogo.com.com">Custom Logo Design</a></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=136&amp;t=get+a+free+logo%21&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=136&amp;title=get+a+free+logo%21&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=136</wfw:commentRss>
		</item>
		<item>
		<title>Remote execution of SSIS packages from an application server, setting custom parameters.</title>
		<link>http://www.b3studios.com/derek/?p=132</link>
		<comments>http://www.b3studios.com/derek/?p=132#comments</comments>
		<pubDate>Thu, 19 Feb 2009 19:08:38 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[VB.NET]]></category>

		<category><![CDATA[.net]]></category>

		<category><![CDATA[dts]]></category>

		<category><![CDATA[execute]]></category>

		<category><![CDATA[execution]]></category>

		<category><![CDATA[remote]]></category>

		<category><![CDATA[server]]></category>

		<category><![CDATA[sql]]></category>

		<category><![CDATA[ssis]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=132</guid>
		<description><![CDATA[Generally I am known on this website for bringing infrequent, but wise tips to as many developers as I can. *wink* *wink* Here is an attempt to ramp up my efforts to help educate people, convert as much C# code to VB, and create some real Microsoft development enthusiasts. 
This post will cover, SQL Server [...]]]></description>
			<content:encoded><![CDATA[<p>Generally I am known on this website for bringing infrequent, but wise tips to as many developers as I can. *wink* *wink* Here is an attempt to ramp up my efforts to help educate people, convert as much C# code to VB, and create some real Microsoft development enthusiasts. </p>
<p>This post will cover, SQL Server Integrated Services (SSIS), and namely one question, with several requirements. You want to execute an SSIS package remotely, perhaps from an ASP.NET webpage? You have a need to do this adhoc, with multiple users. You need to set variables inside the package, hell why else would you go through all the hassle to run this on demand?!</p>
<p>Ok so this sounds like a big issue. First, this is not a beginners SSIS post. If you are looking for how to set custom parameters through execution of SSIS this is not the place to start. However that said, I will provide a brief overview of how it works.</p>
<blockquote><p>
SSIS allows you to use the DTEXEC command (a windows executable, and SQL server command) to execute SSIS packages stored in various locations (local, ssis package store). The following option in a command line allows you to set a variable at runtime.</p>
<p><code>/SET "\package.variables[VariableName]&#8220;;&#8221;Value&#8221;</code></p>
<p>By setting these commands at runtime, you just increased the power of your SSIS capabilties 10 fold. You can now user the power and localization of the SQL server to bear the grunt work of many data tasks, while you leave your application server&#8217;s resources left open for other user crunching. Now we are on the path for removing mindless data routines out of code, into a proper visual designer, and enchancing out application performance by offloading data routines to something that is dedicated to data!
</p></blockquote>
<p>Ok with that little bit of education out of the way lets continue! We&#8217;re assuming that you understand SSIS and SQL Server enough, to be able to Create an SSIS package, upload it to your server and execute it from a SQL Agent Job. This includes making a proxy. In addition to this, you will need a user that belongs to msdb, and can execute dts jobs. (dtsadmin)</p>
<p>Now for the code! This is converted, revamped from dtRemoteExec in C# found on codeplex. There were a few issues I found with this process in daily use. I have started to modify (it is by no means perfect) this code, which can be used in enterprise wide applications. Eventually I would like to have the code build the DTS Exec string for you, but this is still needed.</p>
<p>Here is a little explanation of how things work first! I almost forgot. You will need a DTS execution string like this. </p>
<p><code>"/SQL "\Maintenance Plans\SSISPACKAGE" /SERVER "b3studios" /USER username /PASSWORD password /MAXCONCURRENT " -1 " /CHECKPOINTING OFF  /REPORTING V  /SET "\package.variables[ExportLocation]&#8220;;&#8221;C:\Export&#8221;</code></p>
<p>I prefer to store the package with in the SSIS Package store. HOWEVER!!! Do not use a /DTS for calling the package, which is the default when using SSIS Package Store. This will almost certinly fail, or produce sporatic results. Instead, I prefer to execute the package from the SQL Server, using the /SQL command, let me know your thoughts in the comments.</p>
<p>Ok wheew mouth full, and I should rewrite a lot of this! But I&#8217;m too busy to do so! Here is the code, dubbed RemoteSSIS, based on dtexecremote, and rewritten in VB.NET</p>
<p>Here are the calls you will use from your application. </p>
<p><code><br />
            Dim oRemote As New RemoteSSIS</p>
<p>            oRemote.sqlServer(False) = GetServer()<br />
            oRemote.useProxy("ProxyName") = True<br />
            oRemote.username = "Username"<br />
            oRemote.password = "Password"<br />
            oRemote.dtsCommand = DtsCommand<br />
            If oRemote.CreateJob() Then<br />
                oRemote.RunJob()<br />
            End If</p>
<p>            If oRemote.iscomplete Then<br />
                Return oRemote.ClearJob()<br />
            End If<br />
</code></p>
<p>Here is the code you can add to any module in your project. Add the following references, </p>
<p>Microsoft.SqlServer.ConnectionInfo<br />
Microsoft.SqlSever.SMO<br />
Microsoft.SqlSever.SmoEnum<br />
Microsoft.SqlServer.SqlEnum</p>
<p><code></p>
<p>Imports System.Data<br />
Imports System.Data.Sql<br />
Imports Microsoft.SqlServer.Management.Smo<br />
Imports Microsoft.SqlServer.Management.Smo.Agent<br />
Imports Microsoft.SqlServer.Management.Common</p>
<p>  Public Class RemoteSSIS</p>
<p>#Region "Variables"<br />
        'entry variables<br />
        Private strSqlServer As String = Nothing<br />
        Private strDtsCommand As String = Nothing<br />
        Private strProxyName As String = Nothing<br />
        Private boolUseProxy As Boolean = False<br />
        Private boolSecureConnection As Boolean = False<br />
        Private strUsername As String = Nothing<br />
        Private strPassword As String = Nothing<br />
        Private jobCreated As Boolean = False<br />
        Private jobRan As Boolean = True<br />
        Private jobCleared As Boolean = True<br />
        Private strjobStatus As String = Nothing<br />
        Private boolisfinished As Boolean = False</p>
<p>        'server objects<br />
        Private serverConn As ServerConnection = New ServerConnection<br />
        Private svr As Server<br />
        Private js As JobServer<br />
        Private jb As Job<br />
#End Region</p>
<p>#Region "Properties"</p>
<p>        Public Property sqlServer(ByVal secureConnection As Boolean) As String<br />
            Get<br />
                Return strSqlServer<br />
            End Get<br />
            Set(ByVal value As String)<br />
                strSqlServer = value<br />
            End Set<br />
        End Property</p>
<p>        Public Property dtsCommand() As String<br />
            Get<br />
                Return strDtsCommand<br />
            End Get<br />
            Set(ByVal value As String)<br />
                strDtsCommand = value<br />
            End Set<br />
        End Property</p>
<p>        Public Property useProxy(Optional ByVal ProxyName As String = Nothing) As Boolean<br />
            Get<br />
                Return boolUseProxy<br />
            End Get<br />
            Set(ByVal value As Boolean)<br />
                boolUseProxy = value<br />
                strProxyName = ProxyName<br />
                If boolUseProxy = True And strProxyName = Nothing Then Throw New Exception("can not set use proxy to true, and proxy to Nothing")<br />
            End Set<br />
        End Property</p>
<p>        Public Property username() As String<br />
            Get<br />
                Return strUsername<br />
            End Get<br />
            Set(ByVal value As String)<br />
                strUsername = value<br />
            End Set<br />
        End Property</p>
<p>        Public Property password() As String<br />
            Get<br />
                Return strPassword<br />
            End Get<br />
            Set(ByVal value As String)<br />
                strPassword = value<br />
            End Set<br />
        End Property</p>
<p>        Public ReadOnly Property iscomplete() As Boolean<br />
            Get<br />
                Return boolisfinished<br />
            End Get<br />
        End Property</p>
<p>        Public ReadOnly Property jobStatus() As String<br />
            Get<br />
                Return strjobStatus<br />
            End Get<br />
        End Property</p>
<p>#End Region</p>
<p>#Region "Public Methods"</p>
<p>        Public Function CreateJob() As Boolean<br />
            Try<br />
                'create a new sqlserver object</p>
<p>                serverConn.ServerInstance = strSqlServer<br />
                serverConn.LoginSecure = boolSecureConnection<br />
                serverConn.Login = strUsername 'these should be moved over to the config file<br />
                serverConn.Password = strPassword     'these should be moved over to the config file<br />
                'create a connection to the server</p>
<p>                svr = New Server(serverConn)<br />
                'set the jobserver<br />
                js = svr.JobServer<br />
                'create a unique job<br />
                Dim jobName As String = "dtexecRemote_temp_job_" + Guid.NewGuid.ToString<br />
                'create a new job catagory<br />
                Dim jc As JobCategory = New JobCategory(js, "dtexecRemote")<br />
                'set the job type to local<br />
                jc.CategoryType = CategoryType.LocalJob<br />
                'refresh the job category to see if it exists<br />
                jc.Refresh()<br />
                If Not jc.State = SqlSmoState.Existing Then<br />
                    jc.Create()<br />
                End If<br />
                'create a new job<br />
                jb = New Job(js, jobName)<br />
                'set the category<br />
                jb.Category = jc.Name<br />
                'create the job<br />
                jb.Create()<br />
                'add the ssis goodies next<br />
                jb.ApplyToTargetServer(svr.Name)<br />
                'create a jobstep pointing to the package<br />
                Dim JobStep As JobStep = New JobStep(jb, "run package")<br />
                'add the DTS command to the jobstep<br />
                JobStep.Command = strDtsCommand<br />
                JobStep.ProxyName = strProxyName</p>
<p>                'tell the agent to run an ssis job and actions to take<br />
                JobStep.SubSystem = AgentSubSystem.Ssis<br />
                JobStep.OnSuccessAction = StepCompletionAction.QuitWithSuccess<br />
                JobStep.OnFailAction = StepCompletionAction.QuitWithFailure</p>
<p>                'create the job<br />
                JobStep.Create()<br />
                jobCreated = True<br />
                Return True</p>
<p>            Catch ex As Exception<br />
                jobCreated = False<br />
                Trace.Write(ex.Message)<br />
                Return False<br />
            End Try</p>
<p>        End Function</p>
<p>        Public Sub RunJob()</p>
<p>            jb.Start()</p>
<p>            While (jb.CurrentRunStatus = JobExecutionStatus.Executing)<br />
                Threading.Thread.Sleep(TimeSpan.FromSeconds(2))<br />
                jb.Refresh()<br />
            End While</p>
<p>            Do Until Not jb.LastRunOutcome = CompletionResult.InProgress And Not jb.LastRunOutcome = CompletionResult.Unknown<br />
                Threading.Thread.Sleep(TimeSpan.FromSeconds(2))<br />
                jb.Refresh()<br />
            Loop</p>
<p>            Dim outcome As CompletionResult = jb.LastRunOutcome</p>
<p>            boolisfinished = True<br />
            strjobStatus = outcome.ToString</p>
<p>        End Sub</p>
<p>        Public Function ClearJob() As Boolean</p>
<p>            Try</p>
<p>                If jb.LastRunOutcome = CompletionResult.Succeeded Then<br />
                    jb.Drop()<br />
                    Return True<br />
                Else<br />
                    Return False<br />
                End If<br />
            Catch ex As Exception<br />
                Trace.Write(ex.Message)<br />
                Return False<br />
            End Try</p>
<p>        End Function</p>
<p>#End Region</p>
<p>    End Class<br />
</code></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=132&amp;t=Remote+execution+of+SSIS+packages+from+an+application+server%2C+setting+custom+parameters.&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=132&amp;title=Remote+execution+of+SSIS+packages+from+an+application+server%2C+setting+custom+parameters.&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=132</wfw:commentRss>
		</item>
		<item>
		<title>Wow along night&#8230;. I&#8217;ve been working on this crazy like!</title>
		<link>http://www.b3studios.com/derek/?p=126</link>
		<comments>http://www.b3studios.com/derek/?p=126#comments</comments>
		<pubDate>Tue, 16 Dec 2008 06:14:36 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[broadcatchr]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=126</guid>
		<description><![CDATA[Wow a long day, and I still need to throw some laundry in. I&#8217;ve decided on my next project, and unlike most I don&#8217;t want this one to be vapor ware. I&#8217;ve finally found a good rhythm with work, and my desire to code outside of it, as long as I get projects that interest [...]]]></description>
			<content:encoded><![CDATA[<p>Wow a long day, and I still need to throw some laundry in. I&#8217;ve decided on my next project, and unlike most I don&#8217;t want this one to be vapor ware. I&#8217;ve finally found a good rhythm with work, and my desire to code outside of it, as long as I get projects that interest me. </p>
<p>Today&#8217;s development on broadcatchR is going well. Thanks <a href="http://www.schalicto.com">Josh</a> for the name! Hopefully he gets time to work on this project. Right now I am currently working on getting a XMLTV feed going. Yes, that is right if anyone on the Internets stumbled across this I am working on getting some sort of XMLTV feed going. It maybe free to the Internets, but it maybe select cities. </p>
<p>I am currently working out the details. This will take some time, but I do have something rough working, and I hope to have the Twin Cities, programming guides for the next few weeks available at b3studios, through broadcatchR.</p>
<p>broadcatchR.com carries my latest blog post about broadcatchR related news, let me know what you think about the cross post? I&#8217;m lazy. <img src='http://www.b3studios.com/derek/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=126&amp;t=Wow+along+night....+I%27ve+been+working+on+this+crazy+like%21&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=126&amp;title=Wow+along+night....+I%27ve+been+working+on+this+crazy+like%21&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=126</wfw:commentRss>
		</item>
		<item>
		<title>Welcome to broadcatchR!</title>
		<link>http://www.b3studios.com/derek/?p=124</link>
		<comments>http://www.b3studios.com/derek/?p=124#comments</comments>
		<pubDate>Tue, 16 Dec 2008 02:34:48 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
		
		<category><![CDATA[broadcatchr]]></category>

		<guid isPermaLink="false">http://www.b3studios.com/derek/?p=124</guid>
		<description><![CDATA[This is the first post for my new project, broadcatchR.com Please check in for more on this project soon! I will have it live and going while I develop it. You can read the blog postings on http://www.b3studios.com/derek!
  ]]></description>
			<content:encoded><![CDATA[<p>This is the first post for my new project, <a href="http://www.broadcatchr.com">broadcatchR.com</a> Please check in for more on this project soon! I will have it live and going while I develop it. You can read the blog postings on http://www.b3studios.com/derek!</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http://www.b3studios.com/derek/?p=124&amp;t=Welcome+to+broadcatchR%21&amp;s=normal' height='80' width='52' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://www.reddit.com/button_content?newwindow=1&amp;url=http://www.b3studios.com/derek/?p=124&amp;title=Welcome+to+broadcatchR%21&amp;t=2 ' height='80' width='52' scrolling='no' frameborder='0' ></iframe></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://www.b3studios.com/derek/?feed=rss2&amp;p=124</wfw:commentRss>
		</item>
	</channel>
</rss>
