Category: General

  • Excel: The File couldn’t open in Protected View

  • How to restart remote server using Powershell?

    Some time we need to restart the remote machine or server, i.e. not able to connect through RDP. To restart we need full name of system, if not then we need to call then #1 to do that. If you already knows the name, then you can directly use #2, 1 [system.net.dns]::gethostentry(‘192.168.1.123’) 2 Restart-Computer -ComputerName…

  • How to use CLR function at SQL Server?

    Creating a CLR function in SQL Server involves the following steps: 1. Define the function as a static method of a class in a language supported by the .NET Framework 2. Register the assembly in SQL Server by using the CREATE ASSEMBLY statement 3. Create the function that references the registered assembly by using the…

  • RDP- Automatically sign out of disconnected users?

    Open the ‘Group Policy Editor’ for your server. Navigate to: Local Computer Policy / Computer Configuration / Administrative Templates / Windows Components / Remote Desktop Services / Remote Desktop Session Host / Session Time Limits. Find the key ‘Set time limit for disconnected sessions’ Enable and set the Time Limit at dropdown, what ever you…

  • Replace Blank CELLs with NULL Value

    SELECT ‘UPDATE table SET [‘ + name + ‘] = NULL WHERE [‘ + name + ‘] = ””;’ FROM syscolumns WHERE id = object_id(‘table’) AND isnullable = 1;

  • Cannot load Counter Name data because an invalid index ” was read from the registry

    Cannot load Counter Name data because an invalid index ” was read from the registry When we are trying to read system performance counters, some time we will get this type of error on machines. “Cannot load Counter Name data because an invalid index ” was read from the registry” To fix the issue: Click…

  • Search in MSSQL tables

    Sometime we need to reverse engineering in the database tables to find a specific values, we can find the column name easily but in large database, to search a specific key value is too hard. From below query we can easily search value in all tables, it will list column with table in the result.…

  • Cannot load MVC4 Web project in VS 2017 or VS 2019

    I have a web project, it could load fine in VS15, but in VS2019 it’s failing, saying the project is incompatible. The migration report contains the following message: ========== .csproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=E3E379DF-F4C6-4180-9B81-6769533ABE47 To resolve it: 1. Open…

  • How to read DBF to Datatable

    [csharp] OleDbConnection oConn = new OleDbConnection(@”Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Temp;Extended Properties=dBase III”); OleDbCommand command = new OleDbCommand(“SELECT * FROM Test.DBF”, oConn); oConn.Open(); DataTable dt = new DataTable(); dt.Load(command.ExecuteReader()); oConn.Close(); [/csharp]

  • ORA-28001: The password has expired

    The password life of the applications as well as operating systems are limited. To enabling more security we are getting some alert in daily life that we need to chage our passwords regularly on fixed inerval. If we don’t change before the applications limitation, it will expired. The other day when I was opening SQL…