Month: April 2017

C# : Write DataTable To CSV

Here’s a quick code to write data from database to a CSV format file in C# .NET. I find this function really useful as I frequently come across this scenario where I have to create a report for the client. Once our data is loaded into a DataTable, this function can be used. public static […]

Read More

Visual Studio: Converting a Class Library to Portable Class Library

Before you even start asking GOOGLE about how to convert a Class Library Project to Portable Class Library (PCL) in Visual Studio, why don’t you try to do it by yourself? In fact that is the best approach for this scenario because if you try to google for the solution, you will realize that none […]

Read More

SQL: Get Database Name From Physical Name

Here’s a SQL Function to get name of the database from it’s physical full name. This function can be used in conjunction with RESTORE FILELISTONLY which can generate physicalname,  the parameter of this function, from a database’s backup file. You can read more about RESTORE FILELISTONLY here. create function get_db_name_from_physical_name (@physicalname varchar(500)) returns varchar as […]

Read More

SQL: Save Result From RESTORE FILELISTONLY

RESTORE FILELISTONLY is a Transact Statement in MS-SQL that returns a result set containing a list of the database and log files contained in the backup set in SQL Server. Basically it contains meta-data pertaining to the database’s: LogicalName PhysicalName Type Size MaxSize etc. This information is quite useful when performing Restore operation. For example, […]

Read More

Becoming An Indie Game Developer From A Programmer Background

As Wikipedia defines it, “Independent video game development is the video game development process of creating indie games; these are video games, commonly created by individual or small teams of video game developers and usually without significant financial support of a video game publisher or other outside source.” While both game development and regular software […]

Read More

Freelance Developers Now Earn Through Writing

Since popular freelancing sites are overrated, today I would like to share with you guys one another way to generate extra income. Freelance Writing! Get paid to write articles and tutorials. There are tons of sites on the internet that are craving for excellent content to be published on their sites. Writers In Charge lists […]

Read More

SQL Pivot with Dynamic Column Names

Found a great solution to writing a complex PIVOT function in SQL on the web! The solution was lying on a thread at one of the ASP.NET forums where the question was: “how to display row values in columns in sql server 2008“ and the solution was provided by M. Atif Nadeem from Pakistan. He […]

Read More