Yes you are right - I may have misunderstood.. .I thought what was
requested was merely getting column names.. nothing more.. so that was
the quick and dirty of it. Depending on what was needed - I thought it
may have helped..
I use that quick code if I just need to quickly sniff out the db -
didn't know the involvment of what was needed.
but yes - everything you say below is true - no argument there..
Joe Eugene wrote:
just do a WHERE 0 = 0
This will work for the purpose of getting the schema/columns, but it
brings back the entire Table Data.. because 0=0 leads to "TRUE"
The query has to lead to "False" like i suggested below.
select * from TableName where 1=0;
Which leads to false and brings back NO DATA, Just schema(columns).
This is not the best way to get Table metaData. You should also
be able to get column data types and size limits.
This is only possible with using a Java Alernative(Better) or using
System Table Information.
Joe Eugene
-----Original Message-----
From: Jason Miller [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
]
Sent: Tuesday, March 11, 2003 12:11 AM
To: CF-Talk
Subject: Re: How to get field names in MSAccess
just do a WHERE 0 = 0
I just tested it out and it works
<cfquery name="qName" datasource="#dsndata#">
select * from ModuleFeatures
where 0 = 0
</cfquery>
<cfoutput>
#qName.columnList#
</cfoutput>
outputs all the columns in that table
jay miller
Joe Eugene wrote:
If you don't want to select any data, and just want the column names,
use
or where myprimarykey = #somevalueiknowwontexistinthetable#
What happens.. if you dont have a primary key? out of luck?
select * from TableName where 1=0;
Joe Eugene
-----Original Message-----
From: S. Isaac Dealey [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]>
]
Sent: Monday, March 10, 2003 10:25 PM
To: CF-Talk
Subject: RE: How to get field names in MSAccess
If you don't want to select any data, and just want the column names,
use
<cfquery name="qName" .....>
select * from someTable
where myprimarykey is null
</cfquery>
or where myprimarykey = #somevalueiknowwontexistinthetable#
<cfquery name="qName" .....>
select * from someTable
</cfquery>
<cfoutput>
#qName.columnList#
</cfoutput>
Joe Eugene
Certified Advanced ColdFusion Developer
-----Original Message-----
From: Terry [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED]> ]
Sent: Monday, March 10, 2003 9:32 PM
To: CF-Talk
Subject: How to get field names in MSAccess
I know this is simple, but can't remember.
How do use a query to get list of column or field names.
Using CF5.0
Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~|
Archives:
http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
<http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4>
<http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4>
<http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4>
Subscription: http://www.houseoffusion.com/cf_lists/index
<http://www.houseoffusion.com/cf_lists/index>
<http://www.houseoffusion.com/cf_lists/index>
<http://www.houseoffusion.com/cf_lists/index> .
cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
<http://www.thenetprofits.co.uk/coldfusion/faq>
<http://www.thenetprofits.co.uk/coldfusion/faq>
<http://www.thenetprofits.co.uk/coldfusion/faq>
Get the mailserver that powers this list at
http://www.coolfusion.com <http://www.coolfusion.com>
<http://www.coolfusion.com> <http://www.coolfusion.com>
Unsubscribe:
http://www.houseoffusion.com/cf_lists/uns
<http://www.houseoffusion.com/cf_lists/uns>
<http://www.houseoffusion.com/cf_lists/uns>
<http://www.houseoffusion.com/cf_lists/uns>
ubscribe.cfm?user=633.558.4
s. isaac dealey 954-776-0046
new epoch http://www.turnkey.to
<http://www.turnkey.to>
<http://www.turnkey.to> <http://www.turnkey.to>
lead architect, tapestry cms http://products.turnkey.to
<http://products.turnkey.to>
<http://products.turnkey.to> <http://products.turnkey.to>
tapestry api is opensource http://www.turnkey.to/tapi
<http://www.turnkey.to/tapi>
<http://www.turnkey.to/tapi> <http://www.turnkey.to/tapi>
certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
<http://www.macromedia.com/v1/handlers/index.cfm?ID=21816>
<http://www.macromedia.com/v1/handlers/index.cfm?ID=21816>
<http://www.macromedia.com/v1/handlers/index.cfm?ID=21816>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4