uniqueidentifier in SQL Query

From: Kenneth Keeley (kenkeeley_at_hotmail.com)
Date: 10/12/04


Date: Wed, 13 Oct 2004 09:54:09 +1000

Hi,
  I am trying to get the results out of an SQL database where the Id is
equal to a given value. The Id field is a uniqueidentifier this is what I am
trying to do.

SQLQuery = new SqlDataAdapter("SELECT Id, Title, Publication, InsertDate,
NoPages, Colour, Status " +
    "FROM Features WHERE Id={guid {" + Request.QueryString[ "id" ] + "}};",
DataBaseConnection);

The Querystring value looks like this "3B9767E0-56DD-49FB-8CC0-79A8FE95CEFF"

I keep getting errors and I would like to find a sample of how to do this.

Thanks
    Kenneth.