I have a DSN. From this i can easily get the name if database it is pointing
to.
But how to get the tables in that database at run time?
Thanks,
Dave
HTC Disclaimer: The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader
I think I can answer this one
here is an example of getting tables names dynamically from a database
Hope this helps,
Brad Fetter
[EMAIL PROTECTED]
FLIR Systems, Inc.
cfquery name=datalist datasource=Portdw
SELECT sysobjects.Name as Tablename,
Syscolumns.Name as Fieldname
from
If your on SQL Server use sp_tables look it up in the documentation for
more info.
-Original Message-
From: Bosky, Dave [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 June 2003 5:52 AM
To: CF-Talk
Subject: how to get the tablenames in a database
I have a DSN. From this i can easily get
Thats just for sql server (maybe access too)
WG
-Original Message-
From: Fetter, Brad [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 20:59
To: CF-Talk
Subject: RE: how to get the tablenames in a database
I think I can answer this one
here is an example of getting tables names
What type of DB?
+---+
Bryan Love
Database Analyst
Macromedia Certified Professional
Internet Application Developer
TeleCommunication Systems
[EMAIL PROTECTED]
+---+
...'If there must be trouble, let it
Here is what I use:
Select name,type from sysobjects where xtype = 'u' and name not like 'dt%'
Order By Name
This is for SQL Server
Clint
- Original Message -
From: Fetter, Brad [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, June 26, 2003 2:58 PM
Subject: RE: how to get
For sqlServer, you can also use the spTables and spColumns procedures
For mySQL and others, the SHOW command is the answer (SHOW TABLES and SHOW COLUMNS)
Jerry Johnson
[EMAIL PROTECTED] 06/26/03 04:22PM
Thats just for sql server (maybe access too)
WG
-Original Message-
From: Fetter,
Bosky, Dave wrote:
I have a DSN. From this i can easily get the name if database it is pointing
to.
But how to get the tables in that database at run time?
The standard way is SELECT * FROM INFORMATION_SCHEMA.TABLES
Jochem
8 matches
Mail list logo