C# Select By GUID

I have a column in my table named, Guid.  I need to select a row from this table based on this guid.

I have tried

  "SELECT * FROM MyTable WHERE (Guid = '{19D00616-1903-4376-AFC3-017881B412AB}');"

but I receive a generic error.  (Note: When I try "SELECT * FROM MyTable;" it works fine).

Is there another syntax I should be using to specify the GUID?  If I try and use a datetime field as criteria it works fine also.
LVL 10
Who is Participating?
Anthony PerkinsConnect With a Mentor Commented:
You can use:
  "SELECT * FROM MyTable WHERE GUID = '19D00616-1903-4376-AFC3-017881B412AB'
Anthony PerkinsCommented:
Also, please follow-up on this abandoned question:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.