.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

UDF wrapped in SP

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Sql Server


I have a UDF that does most of the joins and when I run it, it read about 100-150 pages (from sql profiler) but if I wrap this UDF in sp then the sp will do the read about 243287 pages.

Furthermore, the UDF itself performs index seek but the sp performs index scan on one of the searched columns.

Can anyone please advise?

View Complete Post

More Related Resource Links

Removing the HTML wrapped around web parts?

I work with both SP 2007 and 2010 for WCM and this has always been a problem. Every web part or web part zone is almost always wrapped in at least one table and/or several divs. In 2010 I'm finding that even the XLV part is getting this wrapper. Besides being a lot of bloat that wastes bandwidth, it makes it much harder to customize the look and feel of the site. Is there a way to turn this off or modify the output? I don't care what it has to do for edit mode to make the UI function, but when serving pages to anonymous web surfers I'd like to eliminate the code. As an example, here's the beginning wrapper code for a CQWP in SP 2010. The actual content that needs to be displayed is a simple unordered list: <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td id="MSOZoneCell_WebPartWPQ1" valign="top" class="s4-wpcell-plain"> <table class="s4-wpTopTable" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top"> <div WebPartID="c0f138b4-3002-4e47-a797-e4cd1a2b23c1" HasPers="false" id="WebPartWPQ1" width="100%" class="ms-WPBody noindex" allowDelete="false" style="&qu

Binding does not work on wrapped PasswordBox


I have wrapped the default PasswordBox with my own PasswordBox code in order to be able to databind the SecurePassword property as it does not have a dependency property on the default PasswordBox.

Everything is going well except one thing, when I type text in the password box, the binding does not work and the password is not set in my ViewModel. I can see when my panel loads that the Password is being retrieved from my ViewModel, and I can also see that my PasswordBox's SecurePassword property setter is being called when I type in the password (so it calls SetValue(SecurePasswordProperty, value), etc.), it just does not make it to the ViewModel at this point.

Any idea why this is working reading from the bound property but not writing to it?

Here is my PasswordBox code:

using System.ComponentModel;
using System.Security;
using System.Windows;
using System.Windows.Controls;

namespace MyNamespace

  #region class PasswordBox

  /// <summary>
  /// Wraps the default <see cref="System.Windows.Controls.PasswordBox">PasswordBox</see> control
  /// to make the <see cref="SecurePassword">SecurePassword</see> property bindable.
  /// </summary>
  public partial class PasswordBox : UserControl

    #region Dependency Properties

    public static readonly DependencyProperty SecureP

Can't call C# object via a COM interface, because its not wrapped by RCW after GetObjectForIUnknown


I am using some code to try and get a handle to the OLE IDropTarget COM interface implementation for a WPF Window, so that I can call interface methods directly. What I expected is that the object is returned as a COM callable runtime wrapper object, and that I could cast it to my own declaration of the IDropTarget interface, see code below:



Window w = Window.GetW

Connecting 2 user controls that are wrapped in web parts.


As i develop my SP Site, It seems to get more and more complicated lol. Ok, so I have 2 user controls that are in the Smart Part 1.3 web parts. They are ajax enabled and everything works. The Parent and Child controls are both hopped up gridviews. I want to be able to click the title (or some column in the row) and that will populate the other control. I have looked at the ICellProvider stuff but im not sure if that would work considering im using controls and not building actual web parts. What I have in mind is a CAML version if this:

Display all columns where Title = "Whatever was just clicked in the parent".



Matrix Column grouping - Total column incorrect when colum value is wrapped in a call to code


I have a column grouped matrix report that shows count, cost and duration.  Duration is time in seconds.  To format the time on the report as hh:mm:ss I send it through a code block that converts the int to a string. 

When the report is generated the total column is NOT code.convert(sum(Fields!Duration.Value)).  At first I thought it was taking the max value, then I thought it is was taking the first value.. not really sure how it is calculating the value.

I did trying wrapping the expression like this IIF(InScope("matrixgroup"), Code.Convert(Fields!Duration.Value), Code.Convert(Sum(Fields!Duration.Value))).  It didn't make a difference the column is still incorrect.

If I remove the Code.Convert from the column, the value is correct.

Does anyone have any suggestions?



Regular Expression Word Count :: Problem when word wrapped in "", need "eg" to be counted as 1 word


Hi very new to regular expression, i have the following js function to return the number of words displayed in a text area.


 var matches = textarea.replace(/<[^<|>]+?>|&nbsp;/gi,' ').match(/\b/g);
 var count = 0;
 if(matches) {
  count = matches.length/2;


This function works perfectly except when a word is contained in double quotes: eg "word"

This will come back as 3 words, and I need it to be 1

Any help would be much appreciated.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend