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

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

Order by property issue

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


I have a dimension called DimLocation which has this strucutre





I want to arrange the State members using the OrderBy property, if I select the Value  AttributeName and then try to precise the attribute according to which attribute members would be ordered using the next property OrderByAttribute then I didn't find any corresponding attributes in the OrderByAttribute drop own list, I tried to specify this by direct writing the name of the attribute on the property cell but it won't work if I hover the given attribute in the attributes zone (next to the hierarchy zone) a  tooltip tells me "The ordering criteria is set to 'Attribute Name', but the ordering attribute is not set "

The complexity resides in the simplicity

View Complete Post

More Related Resource Links

Issue with multi-valued crawled property

Hi, The problem is, we have a multi-valued crawled property (Managed Metadata type) which we are mapping to a managed property. The managed property has been created, setting MergeCrawledProperties to false.   On the page http://technet.microsoft.com/en-us/library/ff393811.aspx , it states that if MergeCrawledProperties is not set, only the first element is stored in the managed property. We are seeing this behaviour in our environment.   That is causing an issue with refinement results based on this managed property, because it is not including the second element as a result. For example, if we crawl the following content:   Doc1.doc           Property1;Property2 Doc2.doc           Property1;Property2 Doc3.doc           Property2   Refinement results look like this: Property 1           RefinementCount = 2 Property 2           RefinementCount = 1   Ideally we would like to see Property 2’s RefinementCount = 3 to accurately reflect our source data.   We also tried setting MergeCrawledProperties to true , however this merges results together.   For example, with our scenario above, refi

Listview Webpart "rootFolder" private property issue in sharepoint 2010


We have used listview webpart to display document library.

The ListViewWebPart contains a private variable called 'rootFolder' that contains the current folder the webpart is displaying.

Below code snippet is used to obtain the value of the private variable contained within the ListViewWebPart.

private static object GetPrivateFieldValue(object obj, string fieldName)


    FieldInfo fi = obj.GetType().GetField(fieldName,

                            System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);


    return fi.GetValue(obj);



However, This is

perfomance issue with 'order by' clause



  I have copied 2 queries and their execution plans below.first one taking long time to execute and the second one finishes with in a second.can u guys pls explain what is happening inside sql server engine.


--first part

select   se.eventdate
haregistration r inner join
screening_event_slot ses

on r.ScreeningSlotID=ses.SlotId
inner join screening_event se
on se.eventid=ses.eventid  order by EventDate

 |--Nested Loops(Inner Join, WHERE:([microsoft].[dbo].[HARegistration].[ScreeningSlotID] as [r].[ScreeningSlotID]=[microsoft].[dbo].[screening_event_slot].[SlotId] as [ses].[SlotId]))
       |--Nested Loops(Inner Join, OUTER REFERENCES:([se].[EventId], [Expr1006]) WITH ORDERED PREFETCH)
       |    |--Index Scan(OBJECT:([microsoft].[dbo].[screening_event].[IX_EventDate] AS [se]), ORDERED FORWARD)
       |    |--Index Seek(OBJECT:([microsoft].[dbo].[screening_event_slot].[AK_screening_event_slot] AS [ses]), SEEK:([ses].[EventId]=[microsoft].[dbo].[screening_event].[EventId] as [se].[EventId]) ORDERED FORWARD)
       |--Clustered Index Scan(OBJECT:([microsoft].[dbo].[HARegistration].[PK_HAR

Split Container Tab Order Issue



  I have a split container on my form with a MonthCalendar control in Panel1 on the left, tab order 1.0.0 and a Datagridview control in Panel2 on the right, tab order 1.1.0.  When the form opens I want the focus to be on the first visible cell of the Datagridview, but I am unable to change the tab order of the split container panels.

I've tried adding Datagridview.Select or Datagridview.Rows(0).Selected = True to the Form_Load event, but once it runs through all the code & events after it still seems to put the focus back to the MonthCalendar.

Issue with Size Property has an invalid size of 0


In my code I have:

SqlParameter param = new SqlParameter("ID", id);
                param.Direction = ParameterDirection.InputOutput;
                wrapper.ParameterCollection.Add("StudentObjectiveID", SqlDbType.Int).Value = objectiveid;
                wrapper.ParameterCollection.Add("SessionID", SqlDbType.Int).Value = sessionid;
                wrapper.ParameterCollection.Add("StaffID", SqlDbType.Int).Value = staffid;
                wrapper.ParameterCollection.Add("EnteredDate", SqlDbType.DateTime).Value = entereddate;
                wrapper.ParameterCollection.Add("Achievement", SqlDbType.NText).Value = Achievement;
                wrapper.ParameterCollection.Add("SessionStudentID", SqlDbType.Int).Value = session_student_id;
                wrapper.ParameterCollection.Add("ImageName", SqlDbType.NVarChar, 255).Value = imagename;
                wrapper.ParameterCollection.Add("ActualDate", SqlDbType.DateTime).Value = actualdate;
                wrapper.ParameterCollection.Add("FileType", SqlDbType.VarChar, 10).Value = filetype;

                int result = wrapper.ExecuteNonQuery();
                id = (int)param.Value;

And in the relevant stored procedure I

Has anyone experienced filtering issue when the "OrderBy" property of linqdatasoure is set?


Hi all,

I came to know that when I set "OrderBy" in linqdatasource in .aspx, the filters do not properly filter data in DD?

I tried it in List.aspx screen.

Is it a known issue or am I missing something?

Best regards,

Issue with top and order by


I have two different queries in which the only difference is the order by clause. There result set is empty (no records returned). Query 1 runs completes immediately, but Query 2 take 1:06 to complete. Any ideas on why adding the order by clause results in this type of performance penalty?

Thanks, Mike



select cp.* 

from tblcourseregistration cr 

inner join tblcourseposition cp on cr.sitememberid = 77434 and cr.courseregistrationid = cp.courseregistrationid 

order by cp.coursepositionid desc



select top 1 cp.* 

from tblcourseregistration cr 

inner join tblcourseposition cp on cr.sitememberid = 77434 and cr.courseregistrationid = cp.courseregistrationid 

order by cp.coursepositionid desc

SharePoint 2010 Installation Issue - The value for the property 'storeName' is not valid



I'm trying to install SharePoint-2010 enterprise on a single server with Server Farm->Complete option. The SharePoint-2010 production got installed successfully but when I run the Configuration Wizard it throws the following error:

System.Configuration.ConfigurationErrorsException: The value for the property 'storeName' is not valid. The error is: Could not load file or assembly 'SMDiagnostics, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Root\web.config line 7).

I had a working copy of SharePoint 2010 enterprise installed before, I uninstalled because of some other issue. Now when I try to re-install I'm getting above error what could be the issue here?

The details error in PCDiagonostics file:

System.Configuration.ConfigurationErrorsException: The value for the property 'storeName' is not valid. The error is: Could not load file or assembly 'SMDiagnostics, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Root\web.config line 7)

PEOPLE_DL_IMPORT Crawl issue - The directory property cannot be found in the cache.



We have a SharePoint 2007 farm with two web front ends, one app server and one db active passive cluster. We're at SP2 + Feb 2011 CU.

In the past few days, our user profile import and crawl has been working fine, but our Membership and BDC import and crawl has shown errors in the crawl log:

" Crawled: (The directory property cannot be found in the cache.) " 

This affects about 80% of our groups that are crawled. I can still select the AD groups in the people picker, assign permissions with them, etc. But I'd like to resolve that warning.

I believe I've figured out which (AD) directory property is no longer available, but I'm not 100% certain.

Is there a way to confirm which directory property cannot be found in the cache? If so, is there a way to change the PEOPLE_DL_IMPORT content source so that it doesn't throw that warning any more?


Kevin Worthington



WPF / Silverlight tutorial: Visibility property and binding

Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property

abstract away the source of the connection string using a class with a static property.

ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Let's abstract away the source of the connection string using a class with a static property.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo



Is it possible with SQL sorted in descending order according to the word?
In Table I shrajeno Mastercard, Visa, Diners etc ...

All Visa are the first in the order, another Mastercard, etc. ...

Something does not work: ORDER BY PaymentType = 'Visa';

I would not want to work in one field PaymentId (111,222,33, etc. ..) and then use the ORDER BY.

Is this possible in such a way?

Linq qry with order by basic questions


I have never tried a group by with linq, now I do and I'm stuck.

I try to convert this sql statement to its linq counterpart :

SELECT COUNT(tb_Mailer_Smses.Id) AS [cnt], tb_Mailer_mailing.Id As [Id]
,SUM( CASE WHEN tb_Mailer_smses.DLRStatus = 200 THEN 1 ELSE 0 END) As [Delivered]
FROM tb_Mailer_mailing INNER JOIN
tb_Mailer_Smses ON tb_Mailer_mailing.Id = tb_Mailer_Smses.MailingId
WHERE tb_Mailer_mailing.ApplicationId = 1
GROUP BY tb_Mailer_mailing.Id

Is there some one who can me show me the convertion process ?

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