Skip to main content

Posts

Showing posts with the label EDMX

SQL Server Login error: Login failed for user 'NT AUTHORITY\SYSTEM'

  Login failed for user 'NT AUTHORITY\SYSTEM' I tried to add NT AUTHORITY/SYSTEM to SSMS (SQL Server Management Studio) logins, but it was already a principal, showing the following error: Solution :  https://stackoverflow.com/questions/24822076/sql-server-login-error-login-failed-for-user-nt-authority-system Allow NT AUTHORITY/SYSTEM to server Role as sysadmin. 

C# Generic class to parse value - "GenericConverter"

    public class GenericConverter     {         public static T Parse<T>(string sourceValue) where T : IConvertible         {             return (T)Convert.ChangeType(sourceValue, typeof(T));         }         public static T Parse<T>(string sourceValue, IFormatProvider provider) where T : IConvertible         {             return (T)Convert.ChangeType(sourceValue, typeof(T), provider);         }     }     public static class TConverter     {         public static T ChangeType<T>(object value)         {             return (T)ChangeType(typeof(T), value);         }         public static object ChangeType(Type t, object value)   ...

SQL Server Isolation Levels with examples

Following are the different types of isolations available in SQL Server. READ COMMITTED READ UNCOMMITTED REPEATABLE READ SERIALIZABLE SNAPSHOT Let us discuss about each isolation level in details.Before this, execute following script to create table and insert some data that we are going to use in examples for each isolation IF OBJECT_ID('Emp') is not null begin DROP TABLE Emp end create table Emp(ID int,Name Varchar(50),Salary Int) insert into Emp(ID,Name,Salary) values( 1,'David',1000) insert into Emp(ID,Name,Salary) values( 2,'Steve',2000) insert into Emp(ID,Name,Salary) values( 3,'Chris',3000) Note:   Before executing each example in this article, reset the Emp table values by executing the above script. Read Committed In select query it will take only commited values of table. If any transaction is opened and incompleted on table in others sessions then select query...