PC Review


Reply
Thread Tools Rate Thread

Newbie question: Fill dataset will ALL tables from database

 
 
Pierre van Rooyen
Guest
Posts: n/a
 
      20th May 2004
I am a C# developer in ADO.NET and need assistance with a – I assume –
simple question:

How do I get all the data from a database in a dataset? I want to be
able to open any kind of ODBC database and thus do not have any
knowledge of the names of the tables or fields contained in the
database. I could after a day of searching on the Internet not find
ONE example where you don't have to specify which tables you want your
dataset to be populated with.

Thanks in advance
 
Reply With Quote
 
 
 
 
Klas
Guest
Posts: n/a
 
      20th May 2004
There is an example in the Visual Studio help:

ms-help://MS.VSCC/MS.MSDNVS/ado270/htm/mdmthopenschemax.htm
 
Reply With Quote
 
--CELKO--
Guest
Posts: n/a
 
      21st May 2004
>> I want to be able to open any kind of ODBC database and thus do
not have any knowledge of the names of the tables or fields [sic]
contained in the database. <<

You can get to the schema information tables and read them, since they
have standardized names and structures, then you use them to discover
the stuff in the database. It is insanely complicated. The best
answer is that you actually should know what you are doing before you
do it.
 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      21st May 2004
Hi Piere,

You should write a SQL statement to investigate all the tables in your
database.
and execute that with a command.executeQuery

And than make a select for every table.

There is not a SQL statement.
Select * from * as far as I know.
However my knowledge of SQL is fair, because I hate it.

Than I think you can even do when you set the names in a table
\\\
For i as integer = 0 to myTalblenameArray.length - 1
dataadatper.fill(dataset, myTablenameArray(i))
next
///
I hope this helps?

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
Gridview. Fill dataset with various tables shapper Microsoft ASP .NET 1 19th Sep 2007 10:17 AM
Fill Dataset with two tables Laura K Microsoft ASP .NET 6 3rd Mar 2006 06:53 AM
Fill DataSet tables from one SPROC Raterus Microsoft ADO .NET 2 3rd May 2005 07:45 PM
Newbie question: Fill dataset will ALL tables from database Pierre van Rooyen Microsoft ASP .NET 3 21st May 2004 09:43 AM
Newbie question: Fill dataset will ALL tables from database Pierre van Rooyen Microsoft Dot NET 2 21st May 2004 09:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:55 PM.