.NET
.NET, C#, MSSQL and other Microsoft technologies

By Sanda Borlea on December 7, 2009
A simple solution to a complicated error for anyone to try out before searching any further : Having to write a WCF service to handle complex LINQ entities with various foreign key references I came across the following exception when trying to consume the respective service :
Object graph for type “EntityType” contains [...]
Posted in .NET | Tagged cycled, graph, linq, object, reference, serialized, type, WCF

By Sanda Borlea on November 12, 2009
As many other times, I came across this issue having to begin at the wrong end, i.e. having the result and in need of the problem. The samples and recommended procedures offer – as in most cases – only the simplest examples. The workaround is often tedious and in absence of feedback uncertain.
Posted in .NET | Tagged .net, c#, linq, sql

By Sanda Borlea on October 29, 2009
This note refers to Visual Studio snippets and shows how you can easily add your own. Very useful when having to create many classes with lots of properties such snippets save a lot of time.
They are usually to be found in the Visual Studio folder under My Documents (i.e. for VS 2008 : C:\Documents and [...]
Posted in .NET | Tagged c#, snippets, visual studio, xml

By Sanda Borlea on November 29, 2008
Recently needed some quick method to use objects generated from an existing xml file without bothering to create an xml schema for it. After a few attempts and searching for explanations why a simple task like this wouldn´t work, finally put the steps together:
Posted in .NET | Tagged .net, c#, xml

By Armand Niculescu on October 30, 2007
I was forced recently to do some maintenance and bug fixing on an aging .NET-based CMS.
Most of the problems were in the SQL Server database, with lots of corrupted entries. The most frustrating thing however was that at times I didn’t even know where to find the entries. Try finding some specific strings in a [...]
Posted in .NET | Tagged mssql, tutorial

By Armand Niculescu on August 13, 2007
One of the things I’ve always loved about Flash was the transparency regarding the player version penetration, adoption rates, geographical data and so on.
The way we could relatively easy decide what Flash version to target, e.g. “should we use AS3/Flash9 for this project considering that it’ll be completed in 4 months?”
Is there something similar [...]
Posted in .NET | Tagged .net, adobe, flash, microsoft

By Armand Niculescu on July 7, 2007
Every now and then I come across some bad practices that needs repairing. This time the “no-no” was in a database tables. I had to change hard-coded links in quite a few tables. Replacing 10,000 absolute URLs spread across the database can be a huge headache, so I decided to work smart, not hard.
So I’ve [...]
Posted in .NET | Tagged code, find&replace, mssql, tsql, tutorial

By Armand Niculescu on June 5, 2007
I wasted several hours not realizing that MS Access 2007 doesn’t display NULLs in a table.
It all started when we’ve been asked to patch up an old project whose authors have gone missing. The application was ASP.NET 1.1 with an Access db and no source code and no documentation. Oh, the joy!
Posted in .NET | Tagged access, sql

By Armand Niculescu on January 18, 2007
MS SQL has the ability to retrieve data as XML by using the “FOR XML [RAW | AUTO [ELEMENTS] | EXPLICIT]” parameters, which is very useful especially when used in a web service that communicates with a Flash / Flex client as the results don’t have to be converted, but just output to the client.
Your [...]
Posted in .NET | Tagged .net, c#, sql, xml

By Armand Niculescu on October 18, 2006
Here’s a neat thing to remember if you’re using MSSQL:
To change the “sa” password, login to your computer using an administrator account. Open your SQL Server and log in using Windows Authentication. Open a new query window and type in the following command:
Posted in .NET | Tagged mssql, sql, tutorial