PC Review


Reply
Thread Tools Rate Thread

Change DataRow Column Type

 
 
Scott D
Guest
Posts: n/a
 
      8th Jan 2004
I want to be able to change the Column Type in a Dataset from the
imported data type which is Integer to data type string.

The reasoning for this is due to the fact that in the relational
database I store an integer in place of the string due to
relationships between the tables in the database. When I fill the
dataset the column is then an integer but what I need to display in
the column is the string that is associated with the integer in the
table relationship. I am comfortable maniuplating the data within the
dataset but am having a casting problem.
 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      8th Jan 2004
Scott D <(E-Mail Removed)> wrote:
> I want to be able to change the Column Type in a Dataset from the
> imported data type which is Integer to data type string.
>
> The reasoning for this is due to the fact that in the relational
> database I store an integer in place of the string due to
> relationships between the tables in the database. When I fill the
> dataset the column is then an integer but what I need to display in
> the column is the string that is associated with the integer in the
> table relationship. I am comfortable maniuplating the data within the
> dataset but am having a casting problem.


I would suggest adding an extra (derived) column, rather than trying to
change an existing one.

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
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
"'System.DBNull' is a 'type', which is not valid in the given context" - aka what type is DataRow column? mark4asp Microsoft ADO .NET 2 24th Sep 2007 05:03 PM
How to change the column type? ad Microsoft ADO .NET 4 5th Oct 2006 02:30 AM
Re: change datagridview column type from databound string type to DataGridViewImageColumn? hazz Microsoft C# .NET 0 13th Feb 2006 07:50 PM
How do I change a Datagridview column type? =?Utf-8?B?c2ZzbWl0aF8xMzEz?= Microsoft ADO .NET 1 7th Jan 2006 09:48 AM
DataRow column type and RDBMS Edward Diener Microsoft ADO .NET 4 19th Nov 2004 12:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:49 PM.