.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

help to change from cursor to cte or window function or set based

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :
Hi i have table lots of heartbeats i need to know when heartbeat started and when it stopped, and not all the heartbeats in between. Can be multiple heartbeat stops. Thanks
set nocount on
create table #temp (id int, alive bit, checktime datetime)
insert #temp values (1,1,dateadd(minute,-7,GETDATE()))
insert #temp values (1,1,dateadd(minute,-6, 

View Complete Post

More Related Resource Links

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

How do you change the datasource for a list based on another? ie a secondary list being a filtered

I'm actually using Sharepoint 2007, but am hoping this forum will help.  We want to be able to create a list based on a filtered view of another list.  I can create a Filtered List in Designer, but evidently this is saved as a query object on the server and not as another list that can be selected when using the basic Sharepoint tools.  In other words, it's only visible when in Designer.  This means that in order to use this for say a lookup column in another list object, I have to modify the datasource tags for the EditForm and NewForm.aspx pages within Designer.  Also, it means that adding a column would constantly require use of Designer.  We need this to be simple as not all those tasked with administrating pages will know how to do this.  I thought it would be easier if I could simply source a secondary list with the filtered list I created in designer.  In other words, make a secondary list source be that of a queried view of a master list.  Then this list could be used with all the simple tools provided.  Is this possible?  If so... how?

change contents of page based on choices

Hi,I am using AppCode and have 6 arrays of information I want to display on my web page. However I only want three to be visible at any one time. ________________________________ |                    |                       |                 | |                    |                       |                 | ________________________________      button             button            button i.e. a table like the above.   I have created the layout and the choice buttons etc I am using querystrings to pass the changes to the webpage.The problem comes however when trying to write the code for the table diplay. Now each has a slightly different layout.My initial thought was to write

bind values for the drop down based on people picker value change

hi, i have a two lists in my sp. list 1 name  items user1 item1 user1 item2 user2 item1   and list 2 is in this way in this i have a people picker and a drop down when ever i change the name in people picker the value should get filled from list 1 and fill in drop down list so i need to get the on text changed event of people picker and bind it in the dropdown list could some help me out in fixing thisjayaraja

Determine whether HWND is WPF-based window or native one

Dear all The application I'm working on is targeted to share a window image. Given an HWND of a window, we use two approaches to capture it on Vista: native approach for native type of window - using BitBlt function, and Direct3D approach for WPF/Direct3D window which uses hardware for renderring. The question is, how to determing if a HWND is regular (so can be captured well with BitBlt) or is WPF-based or Direct3D-based, so Direct3D approach is needed to capture it. Is there a method to determin, which type of window the given HWND is? Regards, Marc

How can I change the WPF window title bar size through Interop services

Hi all,      I want to use my custom title bar in my custom window. In that need a title bar with more height than default widow title bar height. How can I achieve this through window Interop services???? Thanks in Advance.. Suresh.

bind values for the drop down based on people picker value change

hi, i have a two lists in my sp. list 1 name  items user1 item1 user1 item2 user2 item1   and list 2 is in this way in this i have a people picker and a drop down when ever i change the name in people picker the value should get filled from list 1 and fill in drop down list so i need to get the on text changed event of people picker and bind it in the dropdown list could some help me out in fixing thisjayaraja

Change background colour based on data key change?

Hi there,I have a GridView with an alternating Css style. The GridView has a column called tradeId. What I want to show is an alternating colour based on a change in the tradeId. Is this possible? It will make it easier on the eye to group trades together by colour. Here's the GridView code as it is right now:<asp:GridView             ID="dtlEntryStats"             runat="server"             DataSourceID="sdsEntryStats"             DataKeyNames="tradeId"             AlternatingRowStyle-CssClass="alternating"            GridLines="None"             CssClass="gridView"            AutoGenerateRows="false"             AutoGenerateColumns="false"             AllowPaging="true"           &n

Change a controls properties from another window

I have a WPF App that opens a window (MainWindow) and has a button control that creates a new instance of a Window2 class and calls window2.show() When I click this button I disable it from within MainWindow code. The question I have is when the Window2 onclosing event is called  how do I access the Mainwindow button properties to enable it again. TIA Mike

Excel 2007 Cubeset function - Retrieve subset of customers based on state


I am working on making a report dynamic by allowing a user to choose a State and have the cubeset function return that State's customers.

I have the following

Cell $P$5 =CUBESET("Connection", "[Order Ship to Code].[Order Ship To State].[All Order Ship to Geography].children", "Ship to State")

Cell P6-P32 = CUBERANKEDMEMBER("Connection",$P$5, ROW(A1*))           *A2, A3, etc.

Cell $A$2 = "CA" ("CA" is choosen in the list of states based on a validation list pointing to the CubeRankedMembers in P6-P32)

=CUBESET("Connection", "[Customer Dimension].[Customer Name].[All Customer Dimension].children", "Customers") returns all customers

I have not been able to write a CubeSet function that combines the two sets to retrieve, for example, California Customers

This two functions I have written that are not working correctly...

=CUBESET("Connection", "([Order Ship to Code].[Order Ship To State].[All Order Ship to Geography].["&$A$2&"],[Customer Dimension].[Customer Name].[All Customer Dimension].children)", A$2&" Customers")

=CUBESET("Connection","[Order Ship to Code].[Order Ship To State].[All Order Ship to Geogra

Excel 2007 Cubeset function needs to pull list based on part of field value (ie contains, wildcardin


I have a Cube with a field called 'Item Code'.  This field is six characters in length.  The first two characters differentiate what kind of product it is.  I am building my reports with cube functions.  I do not want to use a pivot table to retrieve the list by using the 'contains' or 'begins with' label filters.  Is there a way to use the cubeset function with left, mid, right functions?  I realize that it can be set up in the cube as a separate field, but I am not able to update the cube.  Below are my examples - 'All Products' and 'Product R3189S' work fine, but I need to retrieve 'Products starting with R3'.

=CUBESET("Financials Sales Cube", "[Product Dimension].[Item Code].[All Product Dimension].children", "All Products")

=CUBESET("Financials Sales Cube", "[Product Dimension].[Item Code].[All Product Dimension].[R3189S]", "Product R3189S")

= CUBESET("Financials Sales Cube", "[Product Dimension].[Item Code].[All Product Dimension].[R3****]", "Products Starting with R3")

Thank you in advance.


how to change the view of SharePoint List based on field?


hi all,

I have different sites in my sharepoint application. in every site i have one list, this list have one field called location. When i open this list in purticular site at the time users  will see only the items where the location filed is equal to the site name.

So please suggest me how we can achieve this?



How to: Change a value in a window through another window

im working in Visual Studio 2010 and im programing with VB.net
so i'm working on Media Player with WPF and i want to know how i can
change a value in the main window through another window. I tried the code
ImgOpacitySlider.Value = My.Windows.main1.Backimage.Opacity
but it did not work.
Can someone help me??!!
!NOTE: I have a slider.Its name is "ImgOpacitySlider" ,a window (or class) .its name is main1 ,an image in main1 .its name is Backimage and a window (or class) to work with options .its name is Option.
Thanks very much.

How do you change the color of the main frame on a Window in WPF?


I have an application where all windows have a very custom look/feel.  When the user has their theme set to Classic, or even set to certain default themes, the colors clash with my main app colors.

Seems like it should be easy to set a brush on the Frame portion of a Window in WPF but this appears to be missing from WPF.

I have searched around, but the only solutions have found involve making the main window transparent and manually creating the border and drawing the frame yourself and handling all the sizing/move options yourself.  I got this to work just fine, however I have a window on which I need to use INTEROP to show an HwndHost on a canvas.

HwndHost doesn't appear when being used on a Transparent window, so I simply cannot make the window Transparent without making my app useless.

I have tried setting the WindowStyle="None" and that gets me close, but shows an ugly thin frame around whatever I put on the window.  I wish "None" really meant none..  Unfortunately, it doesn't.

Does anybody have any way to override the color of the main window frame without making it Transparent or setting the WindowStyle="None" ?

Please help me out with a code sample if you have a good solution for this?

Thanks a bunch,



How to change the Default Value of the Parameter to "Query Based"


Hi I have a Report which i deployed into my localhost.

In the Report Manager, Report Parameter Properties, I unchecked the HasDefault option for which Default value is coming from some Query.

When I retry to Set the Default Value to Query Based, Its not taking.

Need Help.

Policy-Based Management and On Change - Prevent




I’m working on Policy-Based management feature and I’m keen to implement some of the features. I tried to setup a Policy for a “backup device” facet based on the condition that the name starts with bkd_. I tried to set the evaluation mode to “On Change – Prevent” but unfortunately I could not find the mode at all in the Policy Screen. I also made sure the “Nested Triggers” advanced Option is set to 1.


I went through this  link http://blogs.msdn.com/b/sqlpbm/archive/2009/04/13/policy-evaluation-modes.aspx and checked for the execution_mode in  msdb..sysp

SSRS 2005 - Change 2nd Parameter Value based on 1st Parameter Value (Non-queried)


I am wanting to filter my report based on Fiscal Year.  I have the first parameter as @STARTDATE and 2nd parameter as @ENDDATE.  The values for both of these are hardcoded in non queried.  When the user selects the @STARTDATE , I want to automatically set the value for the @ENDDATE parameter.  I'm doing it this way because I'm using BETWEEEN in my SQL Query.  Ideally, I will just have the @ENDDATE value hidden if possible.

So for example:

@STARTDATE has values of 10/1/2009 and 10/1/2010.
@ENDDATE has values of 9/30/2010 and 9/30/2011.

When @STARTDATE is selected to 10/1/2009, set the @ENDDATE value to 9/30/2010.
When @STARTDATE is selected to 10/1/2010, set the @ENDDATE value to 9/30/2011.

Any idea how/if this can be accomplished?

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