custom column in VS2008 DataSet

  • Thread starter Thread starter Cartoper
  • Start date Start date
C

Cartoper

I am working on my first VS2008 project and using DataSet's, which I
am not super familar with. I have a user table in the data set that
has a first name and last name, I would like to add a computed field/
column that is "<fname> <last name>". In .Net 3.5, what is the best
way to do this?
 
Cartoper,

Probably the most simple way to do it is already in your select

Select (FirstName + ' ' + LastName) as fullname from myTable

However, you can as well add an extra column in your program to your
datatable, where you do in fact almost the same in the expression.

The difficult way
http://msdn2.microsoft.com/en-us/library/0c5wf85e(VS.80).aspx

The simple way, try to avoid to understand the sample, it is much easier as
is written in that by leaving some parameters out in the easiest overload of
this method.
http://msdn2.microsoft.com/en-us/library/system.data.datacolumncollection.add(VS.71).aspx

Cor
 
Back
Top