title: What is the limitation in the length of an SqlCommand query
body: <p>Is there a limitation in the length of a query that SQL Server can handle?</p>
  
  <p>I have a normal SqlCommand object and pass a very long select statement as a string. </p>
  
  <p>The query seems to be fine when running against an SQL Server 2005/2008 engine but doesn't execute against an SQL Server 2000 engine. </p>
  
  <p>I don't have any error details as I only have this information 3rd hand but my application isn't working as expected. I could go to the trouble of installing an SQL Server 2000 instance but I was just wondering if anyone has a quick. Yes there is a 4K or 8K limit in SQL Server 2000 but not in 2005 type answer.</p>
  
  <p>I'm aware that I could use stored procedures but lets assume I have a valid reason for not using them :-)</p>