Newbie question: Fill dataset will ALL tables from database

Discussion in 'ASP .Net' started by Pierre van Rooyen, May 20, 2004.

  1. 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
    Pierre van Rooyen, May 20, 2004
    #1
    1. Advertising

  2. select * from all_tables is the correct Oracle syntax, I'm not sure if this will work on SQL Server or Access.

    Keep in mind that multiple DataTable's are not designed to hold a whole database. There is absolutly no logical reason why you should have to put a whole database in a DataSet.You should change your approach, you'll be loading potentially millions of records into memory. Besides, ADO is designed to hold no more than 500 records, I'm not sure if it will hold much more than that

    Good luc
    Mark
    =?Utf-8?B?TWFyaw==?=, May 20, 2004
    #2
    1. Advertising

  3. Pierre van Rooyen

    --CELKO-- Guest

    >> 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.
    --CELKO--, May 21, 2004
    #3
  4. Pierre van Rooyen

    Cor Ligthert Guest

    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
    Cor Ligthert, May 21, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laura K

    Fill Dataset with two tables

    Laura K, Mar 2, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    12,682
    Patrick.O.Ige
    Mar 3, 2006
  2. Chris Brat
    Replies:
    5
    Views:
    694
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
  3. shapper
    Replies:
    1
    Views:
    768
    Just Me
    Sep 19, 2007
  4. Gary Frank

    How many dataBase tables can a dataSet table update via dataGrid?

    Gary Frank, Aug 27, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    160
    Gary Frank
    Aug 27, 2005
  5. Todd
    Replies:
    4
    Views:
    283
    Michael Pearson
    Jan 9, 2004
Loading...

Share This Page