Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 22nd, 2004, 05:44 AM
Authorized User
Join Date: Oct 2004
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Retrieve Table Names using ADO


I have used ADO Connection with provider in an ASP program. I am unable to retrieve the names of tables in that database(Access 2000 database).

I need the code for retrieving the table names and their count in a Jet database.

Please inform me if there is any way.

Ramkumar A D
Old October 22nd, 2004, 08:19 AM
Aal Aal is offline
Authorized User
Join Date: Oct 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts

hmm . . .i haven't tried in ASP Scripts, but if in VB Projects you can use this :
Use reference : ADO also ADO DDL and Security the code like this :

Dim cn as ADODB.Connections
Dim ct as New Catalog 'this from DDL and security class
Dim Tbl as Table
'----------- First Set The Connection ------------ Then ----------
sub GET_TBL()
    set ct.ActiveConnection = cn
    For each Tbl in ct.Tables
        'fill table name in listbox
        list1.additem Tbl.Name
    set ct = nohing
end sub

if succeeded you can convert it in your ASP scripts. Hope this is can help to solve your problems. bye

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a List Box with Table Names & Table date hewstone999 Access VBA 1 February 27th, 2008 10:10 AM
how to Retrieve Column Names Using SQL Query saravananedu Oracle 2 September 10th, 2005 01:57 AM
Retrieve the table names from union query. udayanbi Access 0 July 20th, 2005 01:38 AM
How to Get Table Names in ASP using ADO ramk_1978 ADO.NET 2 October 26th, 2004 03:31 PM
ADO.NET(Retrieve image from databse) lovelyphor ADO.NET 1 October 9th, 2004 10:17 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.