Category Archives: SQL

Recursive user defined function in SQL Server

Introduction In this post I will explain how write a recursive user defined function in SQL Server Description Recursive function is a function which calls itself for a certain number of times based on some business logic. We will create a simple recursive user defined function for calculating factorial of a number. Factorial of a… Read More »

How to write data of an SQL Server table to an XML file using C#

Introduction In this article I will discuss how to write data of an SQL server table to an XML file using C# Description I have an Employees table in Northwind database with some sample data that we are going to write in an XML file. You can download Northwind and pubs sample databases from here… Read More »

Connecting C# application with MySQL database

In this article I will explain how to connect C# application with MySQL database Introduction In this article we will see how to display data in a Windows Forms application from a MySQL database table Step 1: Install MySQL database driver (MySQL Connector/NET) for .NET. Download it from this link http://dev.mysql.com/downloads/connector/net. Step 2: Create a… Read More »

How to store Date and Time in separate columns in SQL Server 2005

In this article I will explain how to store Date and Time in SQL Server 2005 using User Defined Type Introduction In SQL Server 2008 four new data types were added. Two of them are Date and Time for storing date and time as separate data types. But if you need to deal with separate… Read More »