"Either this query does not have a column  with that name, or you have
specified one of the reserved column names, e.g., RecordCount "


   Try ditching the word "Record".  It's a dangerous reserved word in
database land:

<CF_XMLDatasource Name="MyData">
<ListOfCompanies>
      <CompanyData>
            <company_name>Dummy Company</company_name>
            <company_size>4</company_size>
            <alt_address>test</alt_address>
      </CompanyData>
      <CompanyData>
            <company_name>Dummy Company2</company_name>
            <alt_address>test</alt_address>
      </CompanyData>
      <CompanyData>
            <company_name>Dummy Company3</company_name>
            <company_size>5</company_size>
      </CompanyData>
</ListOfCompanies>
</CF_XMLDatasource>


   Try that out, might get rid of your problem.


   Kipp Grose
   Database / Web Developer
   Charity.ca / Sentient Inc.
   [EMAIL PROTECTED] / [EMAIL PROTECTED]



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, 24 March, 2003 11:44 PM
To: [EMAIL PROTECTED]
Subject: [cf-xml] xml query problem


Hi all,
      I recently dowloaded CFXML toolkit and encounter a problem using
SQL
or Xpath style to query XML file. The XML file format is something like
this :
<CF_XMLDatasource Name="MyData">
<RecordList>
      <Record>
            <company_name>Dummy Company</company_name>
            <company_size>4</company_size>
            <alt_address>test</alt_address>
      </Record>
      <Record>
            <company_name>Dummy Company2</company_name>
            <alt_address>test</alt_address>
      </Record>
      <Record>
            <company_name>Dummy Company3</company_name>
            <company_size>5</company_size>
      </Record>
</RecordList>
</CF_XMLDatasource>


When I run this code :
<CF_XMLQuery Datasource="MyData" Name="test" Type="SQL">
      select company_name from MyData
</CF_XMLQuery>

Then I received this error message :
Error Diagnostic Information

An error occurred while evaluating the expression:

            valuetoput =
replace(listgetat(attvaluelist,counter,'|'),'_nothing_','','one');
            QuerySetCell(xmlq,i,valuetoput);
            counter = counter + 1;

Error near line 1, column 94.
------------------------------------------------------------------------
----

----

The column name (Record_company_size) that you have specified is
invalid.
Either this query does not have a column
 with that name, or you have specified one of the reserved column names,
e.g., RecordCount

The error occurred while processing an element with a general identifier
of
(CFSCRIPT),
occupying document position (1:10415) to (1:10424) in the template file
C:\CFusion\CustomTags\xml\XMLQuery.cfm.

Please advice. Thanks in advance.


-----------------------+
cf-xml mailing list
http://torchbox.com/xml/list.cfm

-----------------------+
cf-xml mailing list
http://torchbox.com/xml/list.cfm


-----------------------+
cf-xml mailing list
http://torchbox.com/xml/list.cfm

-----------------------+
cf-xml mailing list
http://torchbox.com/xml/list.cfm

Reply via email to