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

common error in CF & SQL

New Here ,
Jan 31, 2008 Jan 31, 2008
Hi.when I try to delete the last record I've got this error:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'undefined'.

The error occurred in E:\www\Copy of mymol-old\actions\actCustomizeSub.cfm: line 70

68 : dbo.tbl_#tableName#.mymol_sub_category_id = #url.molTopic# AND
69 : dbo.tbl_#tableName#.mymol_sub_subcategory_id = #x#
70 : ORDER BY dbo.tbl_#tableName#.mymol_sub_subcategory_order
71 : </CFQUERY>
72 :



--------------------------------------------------------------------------------

SQL SELECT mymol_sub_subcategory_id FROM dbo.tbl_myOffice_sub WHERE dbo.tbl_myOffice_sub.mymol_sub_site_id = 830 AND dbo.tbl_myOffice_sub.mymol_sub_section = 3 AND dbo.tbl_myOffice_sub.mymol_sub_category_id = 18 AND dbo.tbl_myOffice_sub.mymol_sub_subcategory_id = undefined ORDER BY dbo.tbl_myOffice_sub.mymol_sub_subcategory_order
DATASOURCE MOL_PORTAL
VENDORERRORCODE 207
SQLSTATE 42S22

I'm not sure but maybe its because of the empty ColdFusion query.If it is so how can I fix it?plz help me with that.
thank u.

TOPICS
Advanced techniques
578
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
LEGEND ,
Jan 31, 2008 Jan 31, 2008
you need single quotes around #x#
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 ,
Feb 11, 2008 Feb 11, 2008
I've tried that but still the same error.
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
LEGEND ,
Jan 31, 2008 Jan 31, 2008
How is x being set?

You should be using <cfqueryparam> tags in your queries, btw.

--
Adam
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 ,
Feb 11, 2008 Feb 11, 2008
I don't know exactly how should I use the <cfqueryparam> in my query.would u plz tell me how?
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
LEGEND ,
Feb 11, 2008 Feb 11, 2008
LATEST
> I don't know exactly how should I use the <cfqueryparam> in my query.would u plz tell me how?

Did you start by reading the docs?

http://livedocs.adobe.com/coldfusion/8/Tags_p-q_18.html

And back to my earlier question, which you've not answered:

{quote}
How is x being set?
{quote}

--
Adam
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