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

common error in CF & SQL

New Here ,
Jan 31, 2008 Jan 31, 2008

Copy link to clipboard

Copied

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

Views

419

Translate

Translate

Report

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

Copy link to clipboard

Copied

you need single quotes around #x#

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I've tried that but still the same error.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

How is x being set?

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

--
Adam

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I don't know exactly how should I use the <cfqueryparam> in my query.would u plz tell me how?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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
Documentation