I think this is what you are looking for...

procedure TADOConnection.GetTableNames(List: TStrings;SystemTables:
Boolean);

Populates a string list with the names of tables in the database.


Call GetTableNames to retrieve a list of tables in the associated database.

List is the already-existing string list object into which the tables names
are put.

Set SystemTables to indicate whether the list of table names should include
the database's system tables.


ADOConnection1.GetTableNames(ListBox1.Items, False);

There is also a procedure called GetFieldNames.

Robert


On Mon, Dec 21, 2009 at 4:52 PM, Andries Bos <[email protected]> wrote:

>
>
> I would like o connect to an access database at runtime. I use an
> TADOConnection and a TAdoTable to populate a datagrid with the actual data.
>
> I can connect the the database at runtime by using a dynamic
> connectionstring usign somthing like. "'Provider=Microsoft.Jet.OLEDB.4.0;'+
> "....
>
> There are plenty of good examples to learn how to do this.
>
> however I would populate a combobox with the table name to let the user
> pick one of them.
> The chosen table name would be used to set the Tadotable.tablename
> property.
>
> How could I retrieve all table names within a chosen Access database? (
>
> Regards
>
> Andries
>
> ________________________________
>
> Slide scanning / dia's scannen
> vanaf / from
> E0,08c
> www.scancare.nl
>
> ________________________________
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]



------------------------------------

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [email protected]! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/delphi-en/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to