TwitterLinkedInBlog

Sunday, January 27, 2013

SQL Server Management Studio - Run As Another Domain User

To create a shortcut to SQL Server Management Studio using a different windows domain user:

Right-click your desktop > 'New' > 'Shortcut' > 'Type the location of the item:' > C:\Windows\System32\runas.exe /netonly /user:sampledomain\sampleuser "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" > 'Type a name for this shortcut' > 'SampleUser SQL Server'

Sunday, January 13, 2013

LINQ to EF - Concatenation

var sampleQuery = from s in dbContext.SAMPLE
                                select new
                                {
                                     s.COLUMN_ONE,
                                     CONCAT = s.COLUMN_TWO + " " + s.COLUMN_THREE
                                };

Saturday, January 5, 2013

EF Error - Update Model from Database

ADO.NET Entity Framework (ASP.NET 3.5), SharePoint 2010

Visual Studio 2010
Attempted to 'Update Model from Database'
Received the following error:
Calling 'Read' when the data reader is closed is not a valid operation.

Resolution:
Restarted SQL Server.