There is more cool information available from the ADOConnection.GetSchema method. GetTableNames uses GetSchema.
glad you got it going!! Robert On Tue, Dec 22, 2009 at 1:16 PM, Andries Bos <[email protected]> wrote: > > > Thanks! > > I used > TablesList := TStringList.Create; > dm.ADOConnectionMain.GetTableNames(TablesList, false); > > and it worked. > > thanks for your help > > ________________________________ > > ________________________________ > From: Robert Jenkins <[email protected] <ussRob%40gmail.com>> > To: [email protected] <delphi-en%40yahoogroups.com> > Sent: Tue, December 22, 2009 5:23:04 AM > Subject: Re: [delphi-en] retrieve all table names from access dbase using > ADO > > > 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]<andriesbos%40yahoo.com>> > 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]<delphi-en-unsubscribe%40yahoogroups.comYahoo>! > Groups Links > > > [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/

