I recently came across requirement where user asked to perform complex validation before query is fired to return search screen data. So here is my code snippet you can call inside yourqueryname_ProcessQuery Create stored procedure for validation First thing we …

How to call StoredProcedure in LightSwitch for custom search screen validation Read more »

If you want to ask user before deleting record then write the following code in your screen code editor. Namespace LightSwitchApplication Public Class EditableCustomersGrid Private Sub gridDeleteSelected_Execute() ' Write your code here. If ShowMessageBox("Are you sure you want to delete …

How to show delete confirmation in LightSwitch Read more »

T SQL Date format convert function

If you ever try to update several millions of record in single Update statement then think several times because it can cause real pain. Disadvantage of single Update statement is … Its considered as single transaction and it doesn’t commit …

How to update large number of records in batch Read more »

T SQL Date format convert function

Here is reusable function which can be used to format SQL dateTime to any format like C# or VB.net DROP FUNCTION dbo.fnFormatDate GO CREATE FUNCTION dbo.fnFormatDate (@Datetime DATETIME, @FormatMask VARCHAR(100)) RETURNS VARCHAR(100) AS BEGIN DECLARE @StringDate VARCHAR(100) SET @StringDate = …

T-SQL Date Format Function – fnDateFormat like .net Read more »