Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 9th, 2008, 10:10 AM
Authorized User
Join Date: Sep 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default where this kind datatable created

hi to all friends out there.

I have one doubt that when we write in vb.net as
Dim d1 as datatable and then i create row and column by datarow and data column.
can some one tell me that when we do this where this table create and in which database it get create.

Thank you in advance.

please reply soon

Reply With Quote
  #2 (permalink)  
Old November 9th, 2008, 11:02 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts

The table isn't created in a database; its created in memory.

The DataTable, DataRow and DataColumn classes are all reference types. Reference types are always allocated from the managed heap.

'Dim d1 As New DataTable()' declares and allocates storage space for the variable 'd1' on the managed heap. The New operator returns the memory address of the object. So you're not working with a table in a database at this point, you're working with a bunch of bits stored in memory.

To create a table in a database, you would need to execute a data definintion language query using something like:

SqlCommand DDLCommand = myConnection.CreateCommand();
DDLCommand.CommandText = "CREATE TABLE MyTable (COL1 integer)";

Read up a bit on the fundamentals of working with types (primitive, value and reference) and the .NET Common Language Runtime. It'll all become clearer.



Reply With Quote
  #3 (permalink)  
Old November 10th, 2008, 11:22 AM
Authorized User
Join Date: Sep 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks allot Bob for your reply . Even i was thinking that but just i wanted to confirm.

Thanks again.

Reply With Quote

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Has anyone experienced this kind of thing? jared_edge C++ Programming 1 September 18th, 2006 03:55 PM
kind of Really strange problem kalchev ASP.NET 2.0 Basics 1 March 22nd, 2006 03:32 PM
HI I NEED TO KNOW WHAT KIND OF PROGRAM skoob Java Espanol 0 May 4th, 2005 03:07 PM
How to create this kind of application? spark Classic ASP Basics 1 April 27th, 2005 05:46 PM

All times are GMT -4. The time now is 11:39 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.