The Visual Studio component cache is out of date, Please restart Visual Studio – SSMS

By | June 14, 2020

This is not frequent error but yes we may face such error while connecting to ssms. The Visual Studio component cache is out of date, Please restart Visual Studio. Solution, clear temp files & run disk clean up for c drive. make sure you select temporary files. try reconnecting to ssms again, it will connect.

Using group by of two columns and count in sql

By | December 19, 2019

Here is explanation of Using group by of two columns and count in sql as below, lets say we have two table Emp and Dep. Select * from [dbo].[tblDep] id name 1 IT 2 HR 3 Finance Select * from [dbo].[tblEmp] Empid name Gender depId 1002 Jatin male 1 1003 Nirmal male 1 1004 Aditi… Read More »

Remove duplicate objects from JSON file in javascript

By | December 12, 2019

So here is how we can remove the duplicate objects from json file using javascript, [ { “Id”: “12345”, “Name”: “Jatin” }, { “Id”: “12346”, “Name”: “Ajay” }, { “Id”: “12345”, “Name”: “Jatin” }, ] Now i need to remove duplicate records [whose id matches] from above json file, 1) we need to parse json… Read More »

how to update datatable using linq

By | December 8, 2019

here we will update datatable some/multiple column values using linq as below, dtEmployeeList.Select(string.Format(“[SysId] = ‘{0}'”, id)) .ToList<DataRow>() .ForEach(dr => { dr[“EmployeeLocation”] = strLocation; dr[“Address”] = strAdress; dr[“Salary”] = strSalary; });  

Get List of Records that do not exist in another list using linq

By | December 4, 2019

Here is how to get list of records that do not exists in another list using linq. Let’s say we have below two list. class LinqTwoListProgram { static void Main(string[] args) { List<Employee> employee1 = new List<Employee>(); employee1.Add(new Employee() { EmpId = 101 }); employee1.Add(new Employee() { EmpId = 201 }); employee1.Add(new Employee() { EmpId… Read More »


By | November 28, 2019

UPDATE Table1 SET column1 = T2.column1, column2 = T2.column2 FROM #Table1 T2 JOIN #Table2 T2 ON T1.Column3 = T2.Column3 Lets say we have employee & ProjectTeam table as below respectively, Id Name Address PhoneNumber 11 Ajay Mumbai 887 12 Jatin Pune 356 ProjectId EmpId PhoneNumber P123 11   X234 12   So now we want… Read More »

Intersection of two string arrays in c#

By | November 27, 2019

lets say we have two arrays and we want to find common element which are present in both the arrays, then use intersect method. It is an extension method present in system.linq namespace. string[] days1 = {“Mon”,”Tue”, “thr”, “Fri”, “Sun” }; string[] days2 = {“Mon”,”Wed”, “Fri”, “Sat”, “Sun”}; Here we want to find common days… Read More »

anchor tag href value in jquery

By | November 25, 2019

while working on one project, we came across situation, were we want to read href value of anchor tag and url parameters value, <a href=”\details?name=jatin” class=”mainClass”>jatin nahar</a><br/> so we can read the href value anchor tag as below, $(document).ready(function() { $(“a.mainClass”).click(function( var name = $(this).attr(‘href’).split(‘=’); console.log([1]); }); });