PC Review


Reply
Thread Tools Rate Thread

custom column in VS2008 DataSet

 
 
Cartoper
Guest
Posts: n/a
 
      16th Dec 2007
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
 
 
 
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      19th Dec 2007
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

"Cartoper" <(E-Mail Removed)> schreef in bericht
news:49192fd2-8277-4475-a289-(E-Mail Removed)...
>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
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a custom column in a DataSet Table Cartoper Microsoft ASP .NET 0 27th May 2009 06:33 PM
Populate a custom column in a DataSet Table Cartoper Microsoft ASP .NET 0 27th May 2009 06:33 PM
Dataset class in VS2008 AMP Microsoft C# .NET 1 1st May 2008 03:18 PM
Dataset questions, vs2008 John Microsoft ADO .NET 2 16th Dec 2007 08:09 PM
Dataset questions, vs2008 John Microsoft Dot NET Framework Forms 2 16th Dec 2007 08:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:52 AM.