I'm writing some code that is from a lesson. I've added a field to a table as xml. In VS2010, I run my app and the gridview doesn't show up, it does throw and error and it seems to be in SQL. I'm trying to show the data as nvarchar. Here's the select statement used.
SELECT id, date_added, comment, application_name,extra_data.value('(/data/@username)', nvarchar(100)) as username FROM ApplicationLog WHERE Application_Name = @appname
I haven't been able to find anything that talks about what is needed to fix it. I'm just learning the development aspect of things here at work. Help is greatly appreciated. Thanks