PC Review


Reply
Thread Tools Rate Thread

data table question

 
 
=?Utf-8?B?cm9kY2hhcg==?=
Guest
Posts: n/a
 
      8th Aug 2005
hey all,

Dim _dt As New DataTable("Controls")
_dt.Columns.AddRange(New DataColumn() _
{New DataColumn("Name"), New DataColumn("Type")})

I saw this excerpt in an article on creating a stand alone data table. And I
was wondering if you don't specify the column type what would be the default.
I tested this and it let me add rows but doesn't it have to know the data
type of the column?

thanks,
rodchar
 
Reply With Quote
 
 
 
 
Chris
Guest
Posts: n/a
 
      8th Aug 2005
rodchar wrote:
> hey all,
>
> Dim _dt As New DataTable("Controls")
> _dt.Columns.AddRange(New DataColumn() _
> {New DataColumn("Name"), New DataColumn("Type")})
>
> I saw this excerpt in an article on creating a stand alone data table. And I
> was wondering if you don't specify the column type what would be the default.
> I tested this and it let me add rows but doesn't it have to know the data
> type of the column?
>
> thanks,
> rodchar


I believe it just saves it as an object type.

Chris
 
Reply With Quote
 
=?Utf-8?B?cm9kY2hhcg==?=
Guest
Posts: n/a
 
      8th Aug 2005
thanks.

"Chris" wrote:

> rodchar wrote:
> > hey all,
> >
> > Dim _dt As New DataTable("Controls")
> > _dt.Columns.AddRange(New DataColumn() _
> > {New DataColumn("Name"), New DataColumn("Type")})
> >
> > I saw this excerpt in an article on creating a stand alone data table. And I
> > was wondering if you don't specify the column type what would be the default.
> > I tested this and it let me add rows but doesn't it have to know the data
> > type of the column?
> >
> > thanks,
> > rodchar

>
> I believe it just saves it as an object type.
>
> Chris
>

 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      9th Aug 2005
Rodchar,

Why do you use that underscore in VBNet, I become always crazy to check if
it is a concatination of the row in a message which is transported or meant
that it is a special use of a variable name.

It adds in my opinion nothing (only maybe with the value of a property in
VBNet however there I use m. and that you find alone in a get and set)

Meant as question,

Cor


 
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
Data Table Question? Bob Microsoft Excel Misc 2 3rd Jun 2009 02:09 AM
Question About Updating one table with data another table using a Form DoveArrow Microsoft Access Queries 3 19th Jul 2007 06:47 PM
Question About Updating one table with data another table using a Form DoveArrow Microsoft Access Queries 2 19th Jul 2007 05:24 PM
SQL Question; Populating one table with data from another table. Jan T. Microsoft Access Getting Started 6 26th Apr 2006 09:40 PM
Data Table Question SmokyMtnzz Microsoft Excel Charting 3 6th Dec 2004 05:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:27 AM.