Calculate delay or difference between two dates in sql server

DATEDIFF (Transact-SQL) DATEDIFF ( datepart , startdate , enddate ) You can use SQL Server DateDiff function to calculate difference between two dates. This delay can be calculated in days, months, years, minutes,hours or seconds. Here is documentation from MSDN datepart Is the parameter that specifies on which part of the date to calculate the… Read More »

Extended Error Provider using VB.Net and C#.Net

This article describes how a basic Error Provider class can be extended to include more functionality. This extended class can reduce significant coding for validating objects on windows form. Download Source (VB.Net – VS 2003) Download Source (C#.Net – VS 2005) Features 1) Allows you to validate multiple controls without writing events for each control… Read More »

SQL Server backup utility using VB.Net

Whenever we want to backup or move SQL Server database, most of us prefer to use regular backup utility which is available through Enterprise Manager in SQL Server 2000 or Management Studio in SQL Server 2005. Limitation of using Enterprise Manager or Management Studio is we have to use either complete or differential backups. This… Read More »

System.InvalidOperationException– Maximum length exceeded

Problem You may receiving this error when you try to use javascript to call web methods defined in ASP.Net Web Service file (.ASMX). This error is usually faced when making javascript calls using ASP.Net AJAX framework. The server method failed with the following error: System.InvalidOperationException– Maximum length exceeded. Cause When you call ASP.Net Web Methods… Read More »

The relative virtual path MyUserControl.ascx is not allowed here error in Web.Config

Problem I am trying to add a user control in Web.Config file as below, {codecitation style=”brush: xml; gutter:false”}<controls> <add tagPrefix=”MyControl” tagName=”MyUserControl” src=”MyUserControl.ascx”/> </controls> {/codecitation} It gives me following error, Configuration Error: The relative virtual path ‘MyUserControl.ascx’ is not allowed here. Solution To resolve this issue, move your WebUserControl from root directory to a sub directory.… Read More »

Introduction

Shabdar.org is a common place for developers to discuss their day to day programming challenges. Share your knowledge and expertise with wide range of programmers. This website offers various open source projects. Read articles and download sample codes. Our main focus is on Microsoft Technologies including ASP.Net, C#, VB, Microsoft Visual Studio, SQL Server. You… Read More »