Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework snippets and tutorial

[Solved ]:A network-related or instance-specific error occurred while establishing a connection to SQL Server

How to resolve “a network-related or instance-specific error occurred while establishing a connection to SQL Server” error.

Description:
While I am working on window application I have received the error:


“A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: shared memory provider, error:40 could not open a connection. to sql server)”
How to concatenate strings in sql server

How to concatenate strings in sql server

In this article I am going to explain how to concatenate strings in sql server.

Description:
Earlier we use concatenate strings in Sql server using + symbol. But now sql server introduces the CONCAT function in 2012.

Syntax of + symbol
Select column1+column2 from tablename

Syntax of concat function
Select concat(column1,column2)from tablename

Check Case-Sensitivity in SQL Server

In this article I am going to explain how to Check Case-Sensitivity in SQL Server.


Description:
SQL server determines case sensitivity by collation. COLLATE is the T-SQL clause used to specify a particular collation for an expression. We can use this to validate the users enter password at the time of login.
Sql server: Encrypt store procedure, view and function

Sql server: Encrypt store procedure, view and function

In this article I am going to explain how to Encrypt store procedure, view and function in sql server.


Description:
We write most of logic in Store procedures. Sometime due to security reason we have to hide the logic from end users. Keyword With encryption is used to encrypt the text/logic of store procedure, view and function.
How to take database Backup and restore using command T-Sql

How to take database Backup and restore using command T-Sql

In this article I am going to explain how to take database Backup and restore using command T-Sql.


Description:
We have only 2 commands for database backup, backup database and backup log. Backup database takes backs up the full database and backup log backs up transaction log.

Backup database
Backup database [demo] to disk='D:\demo.bak'

Backup log
backup log [demo] to disk='D:\demolog.bak'

Restore database
restore database [demo] from disk='D:\demo.bak' 









How to create chart with database data using MVC

In this article I am going to explain how to create chart with database using MVC


Description:
I want to show state wise population of Indian states on chart. We have lot of options like jquery based high charts and Jqplot, chart control, chart web helpers etc. You can create more than 30 types of charts like area, bar, column, bubble etc. using chart web helpers. In this tutorial I am going to implement chart using web helpers.
How to Show message in MVC

How to Show message in MVC

In this article I am going to explain how to show/display message in MVC


Implementation:
We can show message using numerous method. I am going to explain some of them here.