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 26th, 2004, 01:15 AM
Authorized User
 
Join Date: Oct 2004
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Get Table Names in ASP using ADO

Hi,

I have created a Jet(Access 2000) database in a Web Server and now i want to create tables for it dynamically in ASP by checking existence of Tables. I need the code for checking the tables existence without error using ADO in ASP file. I have used Provider to connect to the database.

If there is any other way to do this, please inform me.

A.D.Ramkumar
__________________
Ramkumar A D
 
Old October 26th, 2004, 05:16 AM
Aal Aal is offline
Authorized User
 
Join Date: Oct 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmm...this is interesting !!!

i haven't try this code in ASP Script, but you can try like this :
Made reference : ADO 2.5 and DDL and Security 2.5 or higher version

the code like this :

Dim cn as ADODB.Connection
Dim ra as ADODB.Recordset
Dim Ct as Catalog
Dim Tbl as Table
==============================================
 Put a ListBox into your Form Name it as LST1
==============================================
       after you set the connection then
==============================================
sub GET_TABLE()

  Set CT.ActiveConnection = Cn
  For Each Tbl in Ct.Tables
      LST1.Additem Tbl.Name
  Next
  Set Ct = Nothing
end sub

If in ASP Script i think, you should make a different page to showing all the
result.

Nice Coding . . . From Extreme's, bye
Call me if you got one . . . bye


 
Old October 26th, 2004, 03:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Check out these two articles:

http://Imar.Spaanjaars.Com/ViewConte...px?CONTENT=252
http://Imar.Spaanjaars.Com/ViewConte...px?CONTENT=143

The first explains how to retrieve info about a database; the other describes how you can create an entirely new database.

Cheers,

Imar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Check boxes to appear with Table Names hewstone999 Access VBA 1 March 13th, 2008 10:51 AM
Populate a List Box with Table Names & Table date hewstone999 Access VBA 1 February 27th, 2008 10:10 AM
Table names arnabghosh SQL Server 2000 3 November 24th, 2005 10:01 AM
How to Retrieve Table Names using ADO ramk_1978 ADO.NET 1 October 22nd, 2004 08:19 AM
Opening unknown table names NiMot VB Databases Basics 2 July 17th, 2003 02:37 PM





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