Query regarding uniqueidentifier

Hi,

I am trying to update a Sql Server database from an asp.net web application. As far as i now, we can use 'strings' to compare a uniqueidentifier column.

The query is :

update RESULT set SUB_ID = '" + this.dlst_selectsubject.SelectedValue + "' where USR_KEY=='" + mycookie.Value + "' "

Here USR_KEY is a uniqueidentifier.

But i am getting a SqlException : Syntax Error : cannot convert from a character string to uniqueidentifier.

Help me to sort out this problem



Answer this question

Query regarding uniqueidentifier