Steve Trefethen
Contact me Send mail to the author(s)
About Me
View my LinkedIn profile


Powered by discountASP.NET
referal ID: sdtref
Why recommend discountASP.NET?

Archives
Tags
Disclaimer
The posts on this weblog are provided �AS IS� with no warranties, and confer no rights. The opinions expressed herein are my own personal opinions and do not represent my employer�s view in any way.
# Wednesday, July 02, 2008

Setting Subsonic's connectionstring at runtime

Posted @ 11:51AM

Categories: Open Source | Tips

Tags:  | 

I’m a fan of the Open Source project SubSonic, spearheaded by Rob Conery of Microsoft, which describes itself thusly:

A Super High-fidelity Batman Utility Belt. SubSonic works up your DAL for you, throws in some much-needed utility functions, and generally speeds along your dev cycle.

I’ve seen a few questions on the Internet about setting the SubSonic connectionstring at runtime and thought I’d post what I’ve done. SubSonic includes a tool to generate a DAL for you which picks up settings from your .config file which provides the connectionstring among other things. I’m using SubSonic in a plugin to CruiseControl.NET for EDI processing and here the portion of my ccservice.exe.config file related to SubSonic:

<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/> </configSections> <connectionStrings> <add name="Velocity2" connectionString="Data Source=db;Initial Catalog=db;Persist Security Info=True;" providerName="System.Data.SqlClient" /> </connectionStrings> <SubSonicService defaultProvider="Velocity"> <providers> <clear/> <add name="Velocity" type="Subsonic.SqlDataProvider, SubSonic" connectionStringName="Velocity2" generatedNamespace="VelocitySubSonic" includeTableList="AR_*,CORE_*,EDI_*,II_*,IN_*,SA_*" excludeProcedureList="WMS_InsertImportQueue" /> </providers> </SubSonicService> ...

One of the things I wanted to do is override the connectionstring using a property on my CCNET plugin. To do that I implemented a property like this:

[ReflectorProperty("connectionString")] public string ConnectionString { get { return m_connectionstring; } set { m_connectionstring = value; SubSonic.DataService.GetInstance("Velocity").SetDefaultConnectionString(value); } }
The instance name comes from the name used in the config file above then simply call SetDefaultConnectionString and voila the SubSonic connectionstring is now set at runtime.
# Sunday, June 29, 2008

Switching back to My Yahoo classic

Posted @ 4:42PM

Categories: Tips

Tags:

On Thursday, Yahoo rolled out changes to my.yahoo.com updating the layout of the page with a beta version. One of the items that seemingly got lost was the link to switch back to the classic layout. I’ve played with the new layout and still prefer the old classic style that I’ve used for years now. Fortunately, at least for the time being, you can still switch back to the classic layout using this URL.

[Update: July 9th 2008] Well that was short lived, below is a message from my current Yahoo page. Thanks a lot Yahoo.image 
[Update: July 9th 2008 8:30am] I posted a comment last night to this Yahoo blog post asking James, a My Yahoo! Product Lead, why he provided a link to switch back to classic knowing it would last only a week and the comment was deleted. I had included a link to the post I wrote about why Yahoo has frustrated me and indicating that this decision to kill Yahoo Classic was simply yet another reason. I guess that was just too over-the-top.
[Update: July, 14th 2008] Now that we’ve all be forced over to the new page I’m now getting hundreds of search engine hits on this post. Looks like I’m not the only one who like the "Classic" style.
[Update: July 15th 2008] According to one commenter Yahoo is now deleting requests to support the Classic mode from their web site properties though this page is still alive at least for now. I’m now getting 100’s Internet search hits for this post so this is a pretty popular subject. Feel free to digg this post and see if we can shine a little more attention on this.

# Saturday, June 28, 2008

Great American Backyard Campout

Posted @ 4:53PM

Categories: Home

Tags:

Alexis and Colby ready for the Great American Backyard Campout

Celebrating the Great American Backyard Campout!

  • 4:45pm Tents up and full of "gear"
  • ...
  • 6:20am We made it! Kids loved it and Alexis want's to roast marshmellows for breakfast.

Who knows it could be over in a few short hours.  :-)

# Wednesday, June 25, 2008

Our Mac Mini back online with a new main logic board

Posted @ 8:55PM

Categories: Hardware | Home

Tags:  | 

The other day I mentioned our Mac Mini had died after just 18 short months of little use. I’d done some digging around on the web and found good reviews of a company called DT&T Computer Services and after describing the problem they quoted me $245 to replace the main logic board and $15 for shipping and handling. I filled out their online form and printed out my RMA information and sent the machine in last Friday. We got it back today and fortunately, it’s working once again. DT&T has a 6 month warranty which is nice although I hope we don’t have to use it.

I’ll add that my experience with DT&T was very good. They answered the phone immediately when I called, no waiting, hold, etc. answered my questions and once the repairs were done they called to complete payment and confirm shipping. It all went off without a hitch.

Now, of course, the thing I’m happiest about is my wife has her own machine back.

# Tuesday, June 24, 2008

Facebook Starter Kit updated to v1.7

Posted @ 9:38PM

Categories: Development

Tags:

UPDATED Nov. 6, 2008: A new release is available here.

With the recent release of v1.7 of the Facebook Developer’s Toolkit I’ve just updated my Starter Kit which you can download here. The v1.7 version incorporates the New Design Platform Changes introduced by Facebook (unfortunately, the link on the CodePlex page to the FB wiki is incorrect).

Enjoy!

# Monday, June 23, 2008

For me Google Reader just gained some serious competition in feedly

Posted @ 10:12PM

Categories: Tools

Tags:

If you haven’t checked out feedly and you’re a blog/RSS reader you definitely should. It’s a Firefox 3.0 plugin that has some really cool features and turns your feeds into a magazine style web page.

[Updated: June 24, 2008] I should mention that this is really functioning as an alternative UI for Google Reader rather than a replacement since it updates Google Reader as I'm reading items.

 feedly Firefox plugin

# Tuesday, June 17, 2008

SQL Server Index Nightmare

Posted @ 11:21PM

Categories: Tips | Tools

Tags:  | 

The other day I discovered one of the MSSQL tables I’m using heavily at the moment had 214 indices! There were about 20 with sensible names and the rest were all named similar to _dta_index_SA_OrderHeader_5_499519046__K1_2_6_9_13. I mentioned this issue to John Waters in the office today which elicited a nice laugh until I sent him this screenshot:

SQL Manager 2008 Lite

While I’m not exactly new to MSSQL I’m no expert though fortunately Falafel has a few experts on staff and John’s one of them. He dug into the problem answering the what, where and how to deal them, feel free to click through if that’s what you need.

Had I not blogged back in February asking about MSSQL tools this problem would likely have gone undetected for a lot longer. Microsoft’s Management Studio doesn’t show these so called Hypothetical Indices so you have no way of knowing your table/DB is being impacted by them. Ironically, they’re created by the Index Tuning Wizard. Anyway, one commenter to my post mentioned EMS Database Management Solutions (a mouthful notwithstanding whatever EMS stands for) SQL Manager 2008 for which there is a freeware download. SQL Manager’s treeview provides a wealth of information including counts for things like indices which allowed me to easily stumble upon the problem.

All in all, there were 500+ of these indices hanging around but thanks to SQL Manager no longer!