Link to home
Start Free TrialLog in
Avatar of Sherry
SherryFlag for United States of America

asked on

NVARCHAR not recognized built-in function name

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)[1]', 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
Sherry
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sherry

ASKER

Perfect, thank you.  I thought it would be something simple like that.