HighTechTalks DotNet Forums  

custom column in VS2008 DataSet

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss custom column in VS2008 DataSet in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Cartoper
 
Posts: n/a

Default custom column in VS2008 DataSet - 12-16-2007 , 04:36 PM






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?

Reply With Quote
  #2  
Old   
Cor Ligthert[MVP]
 
Posts: n/a

Default Re: custom column in VS2008 DataSet - 12-18-2007 , 10:49 PM






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/lib...5e(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/lib...dd(VS.71).aspx

Cor

"Cartoper" <cartoper (AT) gmail (DOT) com> schreef in bericht
news:49192fd2-8277-4475-a289-688250ccd36e (AT) j20g2000hsi (DOT) googlegroups.com...
Quote:
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?


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.