I believe that to get ACCESS table names you would could either use a
COM
interface for Microsoft DAO ... or if MS ACCESS itself is installed on
the
server, you could use the "Access.Application" object to get access to
the
file:
<CFTRY>
<CFOBJECT TYPE="COM" ACTION="CONNECT" NAME="objAccess"
CLASS="Access.Application">
<CFCATCH TYPE="Any">
<CFOBJECT TYPE="COM" ACTION="CREATE" NAME="objAccess"
CLASS="Access.Application">
</CFCATCH>
</CFTRY>
<CFSET strDatabasePath="c:\mydatabase.mdb">
<CFSET objDBEngine=objAccess.DBEngine>
<CFSET objDatabase=objDBEngine.OpenDatabase(strDatabasePath)>
<CFSET intTableDef=0>
<CFSET blnError=FALSE>
<CFSET objTableDefs=objDatabase.TableDefs>
I don't remember what the properties/methods are of TableDefs. I think
it's
a collection, but objTableDefs.Item() only retrieves based on name, not
index/number I believe...
But who wants to use VBA on a production web-app anyways... ewww!
::brendan avery
::310.779.2211
::[EMAIL PROTECTED]
::santa monica, california
-----Original Message-----
From: Bryan Love [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 15:55
To: CF-Talk
Subject: RE: SQL for grabbing list of tables in DB / fields in table?
this code works for SQL Server 7.
I don't know how to do it in Access (assuming it's possible). I do
know
that you instantiate a windows object using CFOBJECT that will give you
what
you need, but that's probably more involved than what you're looking to
do.
If you run a query on a table you can get a comma delimited list of the
query columns with this variable: #myQuery.columnList#
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may
have
peace'..."
- Thomas Paine, The American Crisis
-----Original Message-----
From: Gyrus [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 3:32 PM
To: CF-Talk
Subject: Re: SQL for grabbing list of tables in DB / fields in table?
> SELECT so.name, sc.name
> FROM sysobjects so, syscolumns sc
> WHERE so.type = 'U' AND so.ID = sc.ID
This doesn't seem to work with Access DB. Is there an
equivalent? Which DBMS is this code compatible with?
cheers,
- Gyrus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______________________________________________________________________
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=coldfusiona
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