I have a DataSet in UserAdmin.xsd with many DataTables. Most of the data come directly from stored procedures. However for one of the tables, I would like to add another column which uses a C# function defined in another file.
I put for the expression for that column: Helper.ObtainUserInfo(user_nm, "displayname"); but that gives me an error “undefined function call”.
Helper.cs is located under App_Code/Common/ and the namespace is COM.A.B.C. UserAdmin.xsd is located under App_Code/.
How can I access the function ObtainUserInfo()? Is there something like a using keyword that I could use?
You cannot use
DataColumn.Expressionto call a .NET-Method to obtain a value. You must refer a column in this table or one of the parent/child tables to calculate the value. For more informations on what you can(‘t) do withExpressionslook here: http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression%28v=VS.100%29.aspxInstead of using a method or an expression, i would recommend to do this with SQL whenever possible.