- see footer for list info -<
Can you dump the contents of query_string?
??? sorry, could you explain?
Perhaps it doesnt like the date format does dd/mm/yyyy make any difference?
doing this gives the same error with
'''14/03/2006''' at the end. I even tried
changing the field to text and memo. To me this
means it's not the date at all.
Also perhaps you should explicitly name the destination columns as well to
ensure there is no ambiguity as to what is being inserted into what
column....
I think you're on the right track here though I
don't know enough about parsing xml to go much
further. Any help here would save me hours/days :-)
Shawn
K
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:dev-
> [EMAIL PROTECTED] On Behalf Of Shawn Fawcett
> Sent: 15 March 2006 05:38
> To: Coldfusion Development
> Subject: [CF-Dev] parsing xml and inserting into Access2000
>
> >- see footer for list info -<
> I'm trying to get the code below to insert data
> into a currency rate table. The table fields are:
> ID (autonumber), Date, USD, JPY, CYP, and another
> 30 odd currencies. I'm getting the following
> error: "Error Executing Database Query.
> [Macromedia][SequeLink JDBC Driver][ODBC
> Socket][Microsoft][ODBC Microsoft Access Driver]
> Syntax error (missing operator) in query expression '''2006-03-14'''. "
>
> not quite sure what I'm missing here.
> thanks for any help,
> Shawn
>
>
> <cfhttp
> url="http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml" method="get"
/>
> <cfset xml = XMLParse(cfhttp.filecontent) />
> <cfset top = "#xml.xmlRoot.Cube.Cube#" />
> <cfset Date = DateFormat(top.xmlAttributes.time,"yyyy-mm-dd") />
> <cfset query_string = "INSERT INTO tblDailyRates VALUES ('#Date#'" />
> <cfloop index="i" from="1" to="#ArrayLen(top.xmlchildren)#">
> <cfset child = top.xmlchildren[i] />
> <cfset query_string = query_string & ",'#child.xmlattributes.rate#'"
/>
> </cfloop>
> <cfset query_string = query_string & ")" />
> <cfquery name="q_addCurrency"
> datasource="#application.DS#"
> username="#application.dbuser#" password="#application.dbpass#">
> #query_string#
> </cfquery>
>
>
>
> ARAXI Traductions France
> 100 Passage Henri Régnault - 92400 Courbevoie La Défense 6
> Tél. : 01 49 03 41 49 - Fax : 01 49 03 41 42
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<
_______________________________________________
For details on ALL mailing lists and for joining
or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
ARAXI Traductions France
100 Passage Henri Régnault - 92400 Courbevoie La Défense 6
Tél. : 01 49 03 41 49 - Fax : 01 49 03 41 42
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<