RE: ODBC Datasources

2001-12-07 Thread Dunwiddie, Bruce

you have to read the registry for both. gl.

-Original Message-
From: tom muck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 11:49 AM
To: CF-Talk
Subject: ODBC Datasources


Is there an easy way to get a list of ODBC datasources on the server through
ColdFusion?  Also, given a datasource, is there a way to get a list of
tables from that datasource?

tom


~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC Datasources

2001-12-07 Thread Jeffry Houser

  The tables in a datasource are stored in the registry?


At 10:52 AM 12/07/2001 -0600, you wrote:
you have to read the registry for both. gl.

-Original Message-
From: tom muck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 11:49 AM
To: CF-Talk
Subject: ODBC Datasources


Is there an easy way to get a list of ODBC datasources on the server through
ColdFusion?  Also, given a datasource, is there a way to get a list of
tables from that datasource?

tom



~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC Datasources

2001-12-07 Thread Dunwiddie, Bruce

cfquery name=gettablenames datasource=#somedsn# dbtype=odbc
select name
from sysobjects
where xtype='U'
/cfquery

-Original Message-
From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 11:18 AM
To: CF-Talk
Subject: RE: ODBC Datasources


  The tables in a datasource are stored in the registry?


At 10:52 AM 12/07/2001 -0600, you wrote:
you have to read the registry for both. gl.

-Original Message-
From: tom muck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 11:49 AM
To: CF-Talk
Subject: ODBC Datasources


Is there an easy way to get a list of ODBC datasources on the server
through
ColdFusion?  Also, given a datasource, is there a way to get a list of
tables from that datasource?

tom




~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: ODBC Datasources

2001-12-06 Thread Dave Watts

 Is there an easy way to get a list of ODBC datasources on the 
 server through ColdFusion?

Yes. You can use CFREGISTRY to read the HKLM\SOFTWARE\ODBC\ODBC.INI key. If
you want native data sources, you can read the appropriate CF registry key.

 Also, given a datasource, is there a way to get a list of
 tables from that datasource?

I don't know if there's a generic ODBC command to get a list of tables (I
seem to remember something about SQLTables, but it's been a while since I've
looked at lower-level ODBC programming), and even if there was, I don't know
how you'd access that at the passthrough SQL level that you use to interact
with ODBC datasources from within CF.

However, most databases have this sort of functionality, and you could
simply look at the registry info for a given datasource to see what database
it uses, then use the database-specific method to get the list of tables.
For example, in SQL Server, you can use the sp_tables stored procedure.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists