>- see footer for list info -<
Shawn

You need to list the columns  names the syntax should be...

insert into mytable (column1, column2) values( value1, value2)

Unless your column names are
Date,USD,JPY,CYP,CZK,DKK,EEK,GBP,HUF,LTL,LVL,MTL,PLN,SEK,SIT,SKK,CHF,ISK,NOK
,BGN,HRK,RON,RUB,TRY,AUD,CAD,CNY,HKD,IDR,KRW,MYR,NZD,PHP,S
GD,THB,ZAR

Also when specifying the column list, the number and order of columns in the
value list should match.

Finally do you actually have a column called date? May be a good idea to
rename it...can't remember if it’s a reserved word or not..

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:dev-
> [EMAIL PROTECTED] On Behalf Of Shawn Fawcett
> Sent: 15 March 2006 10:27
> To: Coldfusion Development
> Subject: RE: [CF-Dev] parsing xml and inserting into Access2000
> 
> >- see footer for list info -<
> I'm trying
> 
>    <cfset query_string = "INSERT INTO
> 
>
tblDailyRates(Date,USD,JPY,CYP,CZK,DKK,EEK,GBP,HUF,LTL,LVL,MTL,PLN,SEK,SIT,S
K
> K,CHF,ISK,NOK,BGN,HRK,RON,RUB,TRY,AUD,CAD,CNY,HKD,IDR,KRW,MYR,NZD,PHP,S
> GD,THB,ZAR)
> VALUES
> (#Date# " />
> 
> 
> but am getting a syntax error??
> 
> At 11:02 15/03/2006, you wrote:
> > >- see footer for list info -<
> >
> ><cfset query_string = "INSERT INTO tblDailyRates (column1,column2) VALUES
> >(#Date# " />
> >
> >
> >K
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:dev-
> > > [EMAIL PROTECTED] On Behalf Of Shawn Fawcett
> > > Sent: 15 March 2006 09:51
> > > To: Coldfusion Development
> > > Subject: RE: [CF-Dev] parsing xml and inserting into Access2000
> > >
> > > >- see footer for list info -<
> > > that fixed that problem. I also got rid of the
> > > quotes around '#child.xmlattributes.rate#'
> > >
> > > the thing though is my first field CurrencyRateID
> > > (autonumber) needs somehow to be skipped...the
> > > date is trying to go into the autonumber field.
> > >
> > > To avoid this I'd like to explicitly name the
> > > destination columns. how could I do this?
> > >
> > >
> > >
> > >
> > > At 10:15 15/03/2006, you wrote:
> > > > >- see footer for list info -<
> > > >Your problem is with the date format, first up, you don';t need the
> >quotes
> > > >around dates, so try...
> > > >
> > > ><cfset query_string = "INSERT INTO tblDailyRates VALUES (#Date# " />
> > > >
> > > >If that still throws an error try
> > > >
> > > ><cfset Date = createODBCDate(top.xmlAttributes.time) />
> > > >Instead of your dateformat line.
> > > >
> > > >-----Original Message-----
> > > >From: [EMAIL PROTECTED]
> > > >[mailto:[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
> >-<
> >
> >
> >
> >
> >_______________________________________________
> >
> >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
-<




_______________________________________________

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

Reply via email to