All RDBMS platforms I've used provide a data dictionary.  These are special
tables that you can query against to get structural information.  MySQL has
a data dictionary and it's documented here:
http://dev.mysql.com/doc/refman/5.0/en/information-schema.html

You may want to create a CFC that queries these tables and provides you an
easy-to-use data dictionary (a quick Googling didn't produce an already
available item).

On Tue, Mar 18, 2008 at 4:03 PM, Richard White <[EMAIL PROTECTED]> wrote:

> thanks for this - is there any way to get the constraint name for a
> particular column, for example the constraint name in the above example is
> qu_41_tb_24_ibfk2. but i wont know the name unless there is a way to get it
> from the database. if i get this then i can delete this first then remove
> the foreign key and it will remove fine
>
> thanks very much
>
>
>
> ><cfdbinfo  type="columns" table="yourtable" datasource="yourDSN"
> >name="dbdata">
> >
> ><cfquery name="getfk" dbtype="query">
> >    SELECT REFERENCED_PRIMARYKEY, REFERENCED_PRIMARYKEY_TABLE
> >    FROM dbdata
> >    WHERE      IS_FOREIGNKEY  = 'YES'
> ></cfquery>
> >
> ><cfdump  var="dbdata">
> >
> >
> ><cfdump  var="getfk">
> >
> >
> >
> >On Tue, Mar 18, 2008 at 11:11 AM, Richard White <[EMAIL PROTECTED]>
> wrote:
> >
> >>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301539
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to