Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

viewing structures made in a coldfusion component

New Here ,
Aug 02, 2008 Aug 02, 2008
i am trying to load data into a database using a component made in the extensions wizard of eclipse. when i do an insert using a cfquery tag in the main page, it works. using the cfc it fails out with a mysql error of cannot do update because of a foreign key constraint, leading me to believe the data isnt making it to mysql. I try to dump the data from the user variable in the main page, but it takes me to the coldfusion administrator and shows me the function info for the cfc, not the struct values. Here is the related code from the main page and all related cfcs. any help is greatly appreciated!
TOPICS
Getting started
331
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 02, 2008 Aug 02, 2008
Hi,
You cannot directly call a CFC and see the values. Instead, create a object of the CFC and pass the required parameters through a cfm file. But here, as you are just inserting, you will not be able to see the values. So do a cfdump and a cfabort before the insert to see which all values are being passed to the DB.

-Prasanth
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2008 Aug 03, 2008
I missed <cfreturn this>. It will work if you do it along these lines.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2008 Aug 04, 2008
LATEST
Thank you very much for your help--changed the <cfreturn this> to <cfreturn "mystructure">, this works!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources