Gyrus,
Yes there is, in SQL Server at least. First, let's get the list of
tables:
1. Table Listing:
I execute the following query on the sysobjects table.
SELECT name
FROM sysobjects
WHERE xtype IN ('U','V')
AND name != 'dtproperties'
NAME = the title of the table.
2. Fieldnames within a table:
This is done via a stored procedure, specific to SQL Server:
EXEC sp_columns @table_name = '<enter table name>'
This will give you a volume of data on the fields in that particular
table.
I don't know if there is any other way to do so in Access. Also, just
to note, I am using SQL Server 2000.
Hope this helps,
--Paul
Paul W. Wille [EMAIL PROTECTED]
--------------------------------------------------
Certified Advanced ColdFusion 5 Developer
--------------------------------------------------
ISITE Design, Inc. � Solutions Architect
www.isitedesign.com
503.221.9860 x110
888.269.9103
503.221.9865 fax
-----Original Message-----
From: Gyrus [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 2:33 PM
To: CF-Talk
Subject: SQL for grabbing list of tables in DB / fields in table?
Does anyone know if there's an SQL statement for grabbing
a list of the names of tables in a DB, or of field names in
a table? I'm working in Access / SQL Server.
cheers,
- Gyrus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists