PC Review


Reply
Thread Tools Rate Thread

Deleting datacolumns

 
 
11Oppidan
Guest
Posts: n/a
 
      13th Jul 2005
Hi,

Two questions using VB.NET and ADO .NET

What is the best way to remove/delete a datacolumn from a datatable (without
using a dataview).
What is the best way to re-order columns in a datatable.

Many thanks.


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      14th Jul 2005
Q1: DataTable.Columns.Remove(index)

Q2: DataView

"11Oppidan" <(E-Mail Removed)> wrote in message
news:%23rg%23Jl$(E-Mail Removed)...
> Hi,
>
> Two questions using VB.NET and ADO .NET
>
> What is the best way to remove/delete a datacolumn from a datatable
> (without using a dataview).
> What is the best way to re-order columns in a datatable.
>
> Many thanks.
>



 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      14th Jul 2005
Thanks for Scotts's quick response.

Hi 11Oppidan,

DataTable.Columns.Remove takes the column name or column reference as
argument. To remove column using it's index, you can use
DataTable.Columns.RemoveAt method.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
11Oppidan
Guest
Posts: n/a
 
      14th Jul 2005
thanks guys!


"Kevin Yu [MSFT]" <v-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for Scotts's quick response.
>
> Hi 11Oppidan,
>
> DataTable.Columns.Remove takes the column name or column reference as
> argument. To remove column using it's index, you can use
> DataTable.Columns.RemoveAt method.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>



 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      14th Jul 2005
You're welcome.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
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
Q: Expressions in DataColumns G .Net Microsoft ADO .NET 2 2nd May 2006 09:33 AM
DataColumns Paperback Writer Microsoft ASP .NET 1 6th Jun 2005 01:12 PM
Index DataColumns In Advance? localhost Microsoft ADO .NET 2 6th Oct 2004 11:07 PM
Authoring Datacolumns WStoreyII Microsoft VB .NET 1 19th Mar 2004 10:44 PM
DataColumns.Expression ronniek Microsoft ADO .NET 0 11th Sep 2003 03:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:09 PM.