Blog Archives

How to TRIM a String in SQL Server

TRIM is a very popular string function in many SQL. But SQL Server does not have TRIM function directly. Instead of TRIM string function SQL Server provides us LTRIM and RTRIM function to remove specified prefix or suffix from a

Posted in Database, SQL Server

SQL to Update Rows in one Table from another Table

Some times we need to Update one table records based on another table value. One classical example is: Updating Product table quantity after placing an Order. Some developer Update Product Quantity by iterating through each order line item. But we

Posted in Database, SQL Server

SQL Server Error: String or binary data would be truncated

More often when we work on Bulk Load or Importing lot of Excel or CSV files into SQL Server from external sources then we received the error “String or binary data would be truncated the statement has been terminated“. The

Posted in Database, SQL Server

Bulk Insert CSV File into SQL Server Table using C# VB.Net

In many cases we need to insert CSV file into SQL Server Database table. Here in this article I will explain how one can “Insert CSV File Data into Sql Server Table using Bulk Insert“. But you can use Bulk

Posted in .Net, C#, Database, SQL Server, VB.Net

SQLBulkCopy to Insert DataTable Rows at a Time into SQL Server Table using C# VB.Net

DataTable is a memory representation of SQL Server DataBase Table. We can direct Insert all records or rows of a DataTable into Sql Server Database Table at a time using SQL Bulk Copy. SQL Bulk Copy is a most efficient

Posted in .Net, C#, Database, SQL Server, VB.Net

How to Change Asp.Net GridView Cell Row and Column color based on condition in C# VB.Net

For data representation Asp.Net GridView Control undoubtedly popular. For making reports more often we use GridView Control. For indication or to attract user on some data we need to change Data forecolor or background color. Here in this article I

Posted in .Net, Asp.net, C#, Database, Gridview, SQL Server, VB.Net

Bind Images in Repeater Control from SQL Server Database in Asp.Net C# VB.Net

Some developers want to store Images into SQL Server Database. For those developers need to retrieve Images from Database and display those images either in GridView or DataList or in Repeater control. In my previous article I have explained how

Posted in .Net, Asp.net, C#, Database, Repeater, SQL Server, VB.Net

Bind SQL Server Stored Procedure Data into DataList using Asp.Net C# VB.Net

To represent data in a tabular view more often we use Asp.Net DataList Control. The DataList Control is such a flexible control where we can bind data in lots of ways. Binding SQL Server Stored Procedure Data into the DataList

Posted in .Net, Asp.net, C#, Database, DataList, SQL Server, VB.Net

How to Bind MS Access Table into DataList in Asp.Net C# VB.Net

For different DataSources we need to Bind Controls differently. DataList has no exception. Here in this article I will explain “How to connect to MS Access DataBase and Bind Data into a DataList Control using Asp.Net C# VB.Net“.

Posted in .Net, Asp.net, C#, Database, DataList, MS Access, VB.Net

GridView Add Edit Delete using AJAX in Asp.Net C# VB.Net

GridView is one of the most popular Asp.Net Control to take user inputs in a tabular format. You can Add records, Delete Records as well as Update Records in a GridView easily. In this article I will explain “How you

Posted in .Net, Ajax, Asp.net, C#, Client, Database, Gridview, Javascript, SQL Server, VB.Net