Wednesday, November 4, 2009

Schema Field ColName=""

never ever use attribute ColName in your schema!

Optional Text. An internal attribute that defines the mapping of the field to the physical storage name for this field. This must be a valid name in the underlying database and must be identical to the name used in the database table. If not specified, the server generates a column name that does not collide with any existing column names and that contains only characters that are allowed by Microsoft SQL Server

Recently I was having a headache with Exception from HRESULT: 0x80040E14 which in log was with more verbose description Parameter "@{ColName}" was supplied multiple times.

I was looking hard to find a duplicity in schema - no luck! But I m not too smart enough to read msdn before doing something) It turned out that in SQL the table already had the same column name which I was trying to use on my new field.

So, to keep it short, there is no use to setup ColName directly, SQL will setup convenient for him name while deploying schema.