Wednesday, December 29, 2010
SharaPoint CAML OrderBy DefaultView Limit
Thursday, November 18, 2010
Truncate and shrink Transaction Log file in SQL Server 2008
In SQL Server this process have been changed. In 2008, just change the recovery model to simple and then use DBCC Shrinkfile command.
use [YourDatabaseName]
select name,recovery_model_desc from sys.databases
GO
Alter database [YourDatabaseName] Set Recovery SIMPLE
GO
Declare @LogFileLogicalName sysname
select @LogFileLogicalName=Name from sys.database_files where Type=1
print @LogFileLogicalName
DBCC Shrinkfile(@LogFileLogicalName,1)
______________________________
If you may want to set the recovery back to Full. If so, add the following.
Alter database [YourDatabaseName] Set Recovery FULL
Thursday, May 27, 2010
XSLT String Padding
<xsl:template name="leftjustify">
<xsl:param name="content"/>
<xsl:param name="width"/>
<xsl:choose>
<xsl:when test="string-length($content) > $width">
<xsl:value-of select="substring($content,1,$width)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$content"/>
<xsl:call-template name="spaces">
<xsl:with-param name="length">
<xsl:value-of select="$width - string-length($content)"/>
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="spaces">
<xsl:param name="length"/>
<!-- the value of this next variable is 255 spaces.. -->
<xsl:variable name="longstringofspaces">
<xsl:text> </xsl:text>
</xsl:variable>
<xsl:value-of select="substring($longstringofspaces,1,$length)"/>
</xsl:template>
Usage:
<xsl:call-template name="leftjustify">
<xsl:with-param name="content">You can do this</xsl:with-param>
<xsl:with-param name="width">40</xsl:with-param>
</xsl:call-template>
Tuesday, July 7, 2009
InfoPath 2007 Template Parts
The InfoPath 2007 was released and it has a new feature called Template Parts. Template Parts is a new type of InfoPath template that allows for predefined forms to be saved and then imported into the InfoPath Controls Task Pane. A Template Part is capable of saving Data Connections, Rules, Conditional Formatting, Data Validation and many other things. Just having this capability has saved me a tremendous amount of time when designing forms and it has increased the ROI for the client. A standard address block is one of the first things that I create for a new client because I'm able reuse it right away and show immediate ROI. At first you might not think this would have a big impact but when you take in account that, you no longer have to worry about defining the data source fields, layout table, field widths, colors, font style/size, data connections for states/regions and country, data validation, rules or conditional formatting then the ROI is reached pretty quickly. Once I understood this capability it changed how I started developing forms.
A feature of a Template Part that you need to take in consideration when using them to help designing forms is the Update capability. The Update capability allows for existing Template Part control on a form to be updated once the master Template Part control has changed and re-imported into the designer. At first this capability was frustrating because I didn't design everything with this in mind but after understanding how it worked, I quickly changed how I was designing forms and took advantage of the Update capability.
Long story short, Template Parts are great if you put thought into how you are building and using them. If you don't do this then it will just adds more complexity when building your InfoPath form and shouldn't be used.
Thursday, July 2, 2009
Infopath - Edit in Browser + Close = "The form has been closed." Annoyed?
Monday, June 29, 2009
Sharepoint Site Creation Notification Email
Wednesday, June 24, 2009
Great Sharepoint Links
- Authentic Admin *.* http://technet.microsoft.com/en-us/library/cc303422.aspx
- Redirect options in Sharepoint http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=48
- SharePoint UI http://www.heathersolomon.com/blog/
- SharePoint Architecture http://www.andrewconnell.com/blog/category/133.aspx
- Impersonation -http://www.sharepointu.com/tanujashares/archive/2007/08/07/impersonation-in-sharepoint-2007.aspx
- User Profile Permission create modify delete code -http://stsadm.blogspot.com/2007/11/personalization-service-permissions.html