title: C#/SQL - What's wrong with SqlDbType.Xml in procedures?
body: <p>I've asked few people why using xml as a parameter in stored procedure doesn't work and everyone said , that's just the way it is. I can't belive that.</p>
  
  <pre><code>command.Parameters.Add("@xmldoc", SqlDbType.Xml);
  </code></pre>
  
  <p>That's where compiler returns error and I can't use NVarChar beacouse it's limiteed to 4k sings. XML would be perfect as it can be 2gigs big. </p>
  
  <p>How come other SqlDbTypes work well and this one retruns error ?</p>
  
  <p>*</p>
  
  <blockquote>
    <p>Error: Specified argument was out of
    the range of valid values. Parameter
    name: @xmldoc: Invalid SqlDbType
    enumeration value: 25.</p>
  </blockquote>
  
  <p>*</p>