- Reorganized my CFCs to read table information.
- Added a tableindex CFC to hold an index of a table.
- Interface now generates a gateway CFC for the table based on indexes.
- Added the ability to save the generated CFCs.
Also, this should work with all databases supported by ColdFusion which makes it a big plus.
Again, you can demo the CFCCreator here and download the source here.
Please read the README file inside the zip for installation instructions.
Any further suggestions to make this better, leave some comments.
You are not logged in, so your subscription status for this entry is unknown. You can login or register here.
Only prob is that I'm getting an error when I try this out on the CFMX7 sample apps.
CFArtGallery > ART
====================
Query Of Queries runtime error. Comparison Exception: While executing "=" Unsupported Type Comparison Exception: Comparator operator "=" does not support comparison between following types: Left hand side expression type = "LONG". Right hand side expression type = "STRING".
==================
Thoughts?
Had to add a couple things..
---------------------------
And change the querys to use PreserverSingleQuotes(comparestr)
Updated the downloadable and demo version.
But the updates are there.
Element BEAN is undefined in FORM.
this sounds like the index.cfm file is not up to date.
You should probably delete the full cfccreator directory and unzip the files again.
With Coldfusion 7 you can't duplicate() CFC's it throws the following error:
Exception Message Unable to duplicate a ColdFusion Component. Detail ColdFusion does not support making a copy of a ColdFusion Component.
Any idea what changes I can make to correct this issue?
About line 30 change the duplicate() function to: CreateObject("component","").init();
but just two quick things:
1) a simple JS error on document.getElementById() from the SELECT boxes. this seems to be because the elements 'tablename' and 'save' don't exist on the page until postback/refreshed. Only applicaable when the page first loads (however it throws a JS error that stops the postback so if you visit it the first time you get nowhere....
2) I've got a datasource that is in the admin but has (temp) moved so it'll generate an error if accessed. So...even though you've got a cftry/catch over the
"cfset conn = dss.getDatasource(names[i]).getConnection()"
and
"cfset databasetype = conn.getMetaData().getDatabaseProductName()"
the bad connection still throws....strange....I coulda sworn that the try/catch you've already got would have been all that was needed to skip over that bad datasource and move onto the next....but it doesn't....
anyhoo, thanx again. a new toy to play with
cheers barry.b
select * from indexqry WHERE NON_UNIQUE = #PreserveSingleQuotes(comparestrprimary)#
Query Of Queries runtime error. Comparison Exception: While executing "=" Unsupported Type Comparison Exception: Comparator operator "=" does not support comparison between following types: Left hand side expression type = "DOUBLE". Right hand side expression type = "STRING". ----------------------------------------- it's just a preserveSingleQuotes() thing. probably because I'm using CF7. dropping the preserveSingleQuotes() and the quotes with "comparestrprimary" and "comparestrnonprimary" seems to work just fine.
no biggie. just a few polite suggestions for the DAO generator Take three...
thanx again barry.b
There are many different routes you can take, especially with the ORM frameworks that are available in ColdFusion now.