<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dev Team Assemble &#187; moss 2007</title>
	<atom:link href="http://www.calvinirwin.net/tag/moss-2007/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.calvinirwin.net</link>
	<description>Evil beware!</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:42:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL Server Recovery Model &#8211; Modification Script</title>
		<link>http://www.calvinirwin.net/2011/10/20/sql-server-recovery-model-modification-script/</link>
		<comments>http://www.calvinirwin.net/2011/10/20/sql-server-recovery-model-modification-script/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 15:59:41 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=298</guid>
		<description><![CDATA[I often find in my sharepoint development environments that I have issues with transaction logs filling up.  This gives me the "Error" page with no indication of what the problem is...yes I can go and change the &#60;customErrors&#62; tag to set the customer errors mode to off and add the callstack to the page [...]]]></description>
			<content:encoded><![CDATA[<p>I often find in my sharepoint development environments that I have issues with transaction logs filling up.  This gives me the "Error" page with no indication of what the problem is...yes I can go and change the &lt;customErrors&gt; tag to set the customer errors mode to off and add the callstack to the page but it still doesn't address the problem.  I whipped this script up because the dev sql server we are using has well over a hundred db's on it and I didn't fell like manually typing the ALTER DATABASE [xxx] SET RECOVERY SIMPLE for each one or doing the clickity click thing either.  Now the solution below probably breaks lots of best practices and such but it works for what I wanted it to do....which is modify all existing db's recovery mode.  To modify new db's recovery mode, just set the model db's option to simple and voila..you are ready to go.
</p>
<p>
Quick note: <strong>YOU PROBABLY DO NOT WANT TO EVER...I MEAN EVER...USE THIS ON A PRODUCTION SYSTEM.</strong>
</p>
<p><code language='sql'><br />
*/</p>
<p>	Modify th recovery model for all databases on your server</p>
<p>*/</p>
<p>	DECLARE @lasterror int</p>
<p>	DECLARE @sql nvarchar(max)</p>
<p>	DECLARE @dbname nvarchar(100)</p>
<p>	DECLARE @dbid int</p>
<p>	DECLARE @recModel int</p>
<p>	-- cycle the log</p>
<p>	exec sp_cycle_errorlog </p>
<p>	CREATE Table #dbInfo</p>
<p>	(</p>
<p>		database_id int NOT NULL,</p>
<p>		dbName nvarchar(100) NOT NULL,</p>
<p>		recoveryModel int</p>
<p>	)</p>
<p>	--SELECT database_id, [name], recovery_model FROM sys.databases order by database_id</p>
<p>	SELECT TOP 1 @dbid = database_id FROM sys.databases where database_id > 4  ORDER BY database_id asc;</p>
<p>	SELECT @dbname = [name] FROM sys.databases where database_id = @dbid;</p>
<p>	SELECT @recModel = recovery_model FROM sys.databases where database_id = @dbid;</p>
<p>	-- begin backup process</p>
<p>	WHILE @dbid > 0</p>
<p>	BEGIN</p>
<p>		INSERT INTO #dbInfo (database_id, dbName, recoveryModel) VALUES (@dbid, @dbname, @recModel);</p>
<p>		IF @recModel = 1</p>
<p>		BEGIN</p>
<p>			SELECT @sql = 'ALTER DATABASE [' + @dbname + '] SET RECOVERY SIMPLE'</p>
<p>			EXEC sp_executesql @sql</p>
<p>			SELECT @lasterror = @@ERROR</p>
<p>			IF @lasterror <> 0</p>
<p>				-- log the error to the message console</p>
<p>				PRINT 'ERROR: Changing the recovery mode for database : ' + @dbname + ' with error number ' + CAST(@lasterror as nvarchar(25))</p>
<p>			ELSE</p>
<p>				PRINT 'Recovery mode changed to simple (3) for database : ' + @dbname</p>
<p>		END</p>
<p>		-- get a new record</p>
<p>		SELECT @dbid = 0;</p>
<p>		SELECT TOP 1 @dbid =  database_id FROM sys.databases where database_id > 4 and</p>
<p>			database_id NOT IN (SELECT DISTINCT x.database_id FROM #dbInfo x);</p>
<p>		SELECT @dbname = [name] FROM sys.databases where database_id = @dbid;</p>
<p>		SELECT @recModel = recovery_model FROM sys.databases where database_id = @dbid;</p>
<p>	END	</p>
<p>	DROP Table #dbInfo</p>
<p>	SELECT database_id, [name], recovery_model FROM sys.databases order by database_id</p>
<p>	GO</p>
<p></code></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/moss+2007' rel='tag' target='_self'>moss 2007</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/SQL+Server' rel='tag' target='_self'>SQL Server</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2011/10/20/sql-server-recovery-model-modification-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2007 FBA- Upload Mutiple Documents Missing From Menu</title>
		<link>http://www.calvinirwin.net/2011/10/17/sharepoint-upload-multiple-documents-missing/</link>
		<comments>http://www.calvinirwin.net/2011/10/17/sharepoint-upload-multiple-documents-missing/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 15:14:40 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[FBA]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=292</guid>
		<description><![CDATA[Scenario: Forms Based Authentication on an external facing portal.  Users are having trouble (as in not able too) uploading multiple documents at once.
This was a pretty easy fix....Enable Client Integration for the given website zone in Central Administration.



Technorati Tags: Configuration, FBA, moss 2007, SharePoint


]]></description>
			<content:encoded><![CDATA[<p><strong>Scenario</strong>: Forms Based Authentication on an external facing portal.  Users are having trouble (as in not able too) uploading multiple documents at once.</p>
<p>This was a pretty easy fix....<strong>Enable Client Integration </strong>for the given website zone in <strong>Central Administration</strong>.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/FBA' rel='tag' target='_self'>FBA</a>, <a class='technorati-link' href='http://technorati.com/tag/moss+2007' rel='tag' target='_self'>moss 2007</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2011/10/17/sharepoint-upload-multiple-documents-missing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Collection Images and ImageFieldValue</title>
		<link>http://www.calvinirwin.net/2009/11/26/site-collection-images-and-imagefieldvalue/</link>
		<comments>http://www.calvinirwin.net/2009/11/26/site-collection-images-and-imagefieldvalue/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 03:33:46 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=237</guid>
		<description><![CDATA[One of the things I was working on today was trying to get an actual image from the library was that initially I was expecting to get a PublishingImage.  All the samples on MSDN and the ones strewn about the web refer to using the ImageFieldValue and getting it from a field in the SPListItem.  [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I was working on today was trying to get an actual image from the library was that initially I was expecting to get a PublishingImage.  All the samples on MSDN and the ones strewn about the web refer to using the ImageFieldValue and getting it from a field in the SPListItem.  Like outlined on <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.fields.imagefieldvalue.aspx">MSDN </a>:</p>
<pre class="csharp">  <span style="color: #008080; font-style: italic;">// Retrieve the current value from an SPListItem with a</span>
  <span style="color: #008080; font-style: italic;">// column of the ImageField type with the name imageFieldName</span>
  ImageFieldValue currentFieldValue =
        listItemWithImageField<span style="color: #000000;">&#91;</span>imageFieldName<span style="color: #000000;">&#93;</span> <span style="color: #0600FF;">as</span> ImageFieldValue;</pre>
<p>The problem is this only works for images that are in a list, like the PublishingRollupImage of a page that links to an image in the Site Collection Images library.  The actual images in the library are stored as documents (Referenced using SPFile) so in order utilize them I need to extract the information out and create an image tag for it...like so:</p>
<pre class="csharp">&nbsp;
     ImageFieldValue imageValue = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ImageFieldValue<span style="color: #000000;">&#40;</span>
          <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;&lt;img src=<span style="color: #008080; font-weight: bold;">\&quot;</span>{0}<span style="color: #008080; font-weight: bold;">\&quot;</span> alt=<span style="color: #008080; font-weight: bold;">\&quot;</span>{1}<span style="color: #008080; font-weight: bold;">\&quot;</span> /&gt;&quot;</span>,
          file.<span style="color: #0000FF;">Url</span>, file.<span style="color: #0000FF;">Title</span> == <span style="color: #0600FF;">null</span> ? <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Empty</span> : file.<span style="color: #0000FF;">Title</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;</pre>
<p>Now that I had the ImageFieldValue it was easy to work with.  I could manipulate many aspects of the image using this object and then save it for rendering using ToString().  Funny thing is for my purposes (ImageGallery xml generation) I didn't even end up needing this code after all...frustrating but a good learning experience.  </p>
<p>Props to <a href="http://vlifeblog.com">Phanat Chan</a> as he did the initial development on this.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/moss+2007' rel='tag' target='_self'>moss 2007</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/11/26/site-collection-images-and-imagefieldvalue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Variations Failed: An error was encountered performing this operation. You may re-try the operation&#8230;</title>
		<link>http://www.calvinirwin.net/2009/10/30/variations-failed-an-error-was-encountered-performing-this-operation-you-may-re-try-the-operation/</link>
		<comments>http://www.calvinirwin.net/2009/10/30/variations-failed-an-error-was-encountered-performing-this-operation-you-may-re-try-the-operation/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 20:16:27 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[variations]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=225</guid>
		<description><![CDATA[So I got this error the other day when putting together a dev site collection usign varations:
An error was encountered performing this operation. You may re-try the operation, and you may need to clean up the half-created data first before re-trying. If the problem persists, please contact your system administrator
This was actually a fairly easy [...]]]></description>
			<content:encoded><![CDATA[<p>So I got this error the other day when putting together a dev site collection usign varations:</p>
<p><em>An error was encountered performing this operation. You may re-try the operation, and you may need to clean up the half-created data first before re-trying. If the problem persists, please contact your system administrator</em></p>
<p>This was actually a fairly easy fix for me.  I simply had to enable the publishing features in my site.  Which is funny...because they should have been on but I must have overlooked that.  <img src='http://www.calvinirwin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/moss+2007' rel='tag' target='_self'>moss 2007</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/variations' rel='tag' target='_self'>variations</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/10/30/variations-failed-an-error-was-encountered-performing-this-operation-you-may-re-try-the-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

