title: C# SQL Geometry Error: Invalid operator for data type. Operator equals equal to, type equals geometry
body: <p>Using C# and LOCAL SQL SERVER
  Making an SQL call which is:</p>
  
  <pre><code>string cmd2 = "SELECT Circle_ID FROM Circle WHERE Center_Point = geometry::STGeomFromText('POINT(";
          cmd2 += center_lat;
          cmd2 += " ";
          cmd2 += center_lng;
          cmd2 += ")',0)";
  </code></pre>
  
  <p>and I receive the error: </p>
  
  <blockquote>
    <p>Invalid operator for data type. Operator equals equal to, type equals geometry. Error Number:403,State:1,Class:16</p>
  </blockquote>
  
  <p>Syntax I believe is correct referencing <a href="http://www.sql-server-helper.com/sql-server-2008/convert-latitude-longitude-to-geography-point.aspx" rel="nofollow">#Ref1</a> and <a href="https://msdn.microsoft.com/en-us/library/cc280487.aspx" rel="nofollow">#Ref2</a>.</p>
  
  <p>Note: I understand about parameterized sql queries which I will be doing. But first I just want to get the sql working.
  Thanks</p>