How to Create RDLC Report Step by Step Example in ASP.net using C# and VB.net

Now a days for reporting purposes we have a lots of choice. RDLC report is one of the most popular reporting engine for Asp.net developers. Using RDLC report you can easily represent data to the end user. You can also export the report in Excel, PDF & MS Word format. Print functionality also in built in this ReportViewer control. This a very basic RDLC report tutorial for beginners. In my next articles I will also provide more example on RDLC report. Here I am providing “Creating RDLC report Step by Step in Asp.Net C# & VB.Net“. Hope it will help you.

Read more ›

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

SQL SERVER – SQL CASE Statement Conditions Examples Syntax and Explanation

The SQL CASE statement is used as a conditional operator that considers a value or expression, examines it, and return values if matched. CASE is used to provide if-then-else type of logic or Switch Case type of logic to SQL. There are two formats: The first is a Simple CASE expression, where we compare an expression to static values. The second is a Searched CASE expression, where we compare an expression to one or more logical conditions. We can replace resource hungry Cursor/Looping SQL and can provide better performance using CASE statement.

One can use CASE expressions anywhere in the SQL Query like within SELECT statement, WHERE clause, Order by clause, HAVING clause,Insert, UPDATE and DELETE statements.

Read more ›

Posted in Database, SQL Server

Using SQL Server SUBSTRING Function

SUBSTRING() function is one of the most useful and popular string manipulation function of SQL Server. This function allows you to extract a specific substring or a portion of substring from a string. In this SQL Server Tutorial I will explain how to use the SUBSTRING function in SQL Server (Transact-SQL/TSQL) with syntax and examples.

Read more ›

Posted in Database, SQL Server

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 string. which is more sophisticated. You can also do the same functionality by using both LTRIM() and RTRIM() function together. To make you a good understand her I will show some example on TRIM string function. Hope it will help you.

Read more ›

Posted in Database, SQL Server

How to Create and Use a GUID in Asp.net C# VB.Net Application

What is a GUID:
If you don’t know about GUID, a GUID (Globally unique identifier) is a 128-bit integer that can be used to uniquely identify a record or data. Specially we use GUID as a prefix or post-fix while we gave users to upload images or files in a same folder. Another common usage is to create a auto increment integer. So finally A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.

Read more ›

Posted in .Net, Asp.net, C#, VB.Net

Efficient way to Save or Insert TextBox Value into SQL Server DataBase Table In Asp.net Using C#.Net VB.Net

In every cases we need to Save or Insert data into Database. For beginner’s here i will describe how we can “Save or Insert TextBox Value into SQL Server DataBase Table using Asp.net C#.Net VB.Net”. There are a lot of ways to Save or Insert Data into Sql Server Database. But I will show you how we can do it easily and more efficiently.

Read more ›

Posted in .Net, Asp.net, C#, VB.Net

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 can do this in a single query. Here in this article I will show you “How to Update Rows in one table from another table in SQL SERVER using a Single SQL Query“.

Read more ›

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 reason is simple. One or some of your column value length exceeded the column length declared in the table. So first we nee to produce the error.

Read more ›

Posted in Database, SQL Server

How to Replace Null Value in Asp.Net GridView BoundField Column in C# VB.Net

If the datasource of a GridView control contains NULL value then the GridView Cell render blank text. To make the information more meaningful we need to replace the NULL value with a meaningful word or a line. GridView BoundField column provides us a property named NullDisplayText, by which we can display any text instead of NULL.

Read more ›

Posted in .Net, Asp.net, C#, Gridview, VB.Net

How to Replace Null Value in Asp.Net GridView Template Field or Template Column in C# VB.Net

Null means nothing or meaningless. To make it meaningful we need to replace null value by an understandable word or a line. In C# and VB.Net we do it easily. But in GridView it’s a bit different. We can replace null value easily in GridView without calling any server side method or even replacing it in database query time. Here in this example I will show you “How we can replace NULL value in GridView TemplateField“.

Read more ›

Posted in .Net, Asp.net, C#, Gridview, VB.Net