This should also work if you want to keep the xmltype in your table:
<cfquery name="iXMLorder" datasource="sds_dev">
INSERT INTO xmlorders
VALUES('69', XMLType(<cfqueryparam value="#xmlString#"
cfsqltype="cf_sql_clob">))
</cfquery>
Also, don't forget to use getClobVal() when selecting the xmltype data.
EDIT: cf_sql_longvarchar or cf_sql_clob... Whichever works...
-- Andrew
-----Original Message-----
From: Carlos Paez Jr [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 27, 2007 11:40 AM
To: CF-Talk
Subject: Re: Parsing an XML file and inserting into Oracle SYS.XMLTYPE
Hi James,
I did try to use cf_sql_clob but I was getting this error:
Error casting an object of type to an incompatible type. This usually
indicates a programming error in Java, although it could also mean you
have tried to use a foreign object in a different way than it was
designed.
so I was forced to use cf_sql_longvarchar
On 9/27/07, James Holmes <[EMAIL PROTECTED]> wrote:
>
> If your column is CLOB, use cf_sql_clob as your type (that's what it's
> for).
>
> On 9/27/07, Carlos Paez Jr <[EMAIL PROTECTED]> wrote:
> > All, problem fixed! Thanks for the help!
> >
> > I changed my Oracle column to type CLOB instead of SYS.XMLTYPE and
> > changed my insert query to explicitly cast with cfqueryparam:
> >
> > <cfquery name="iXMLorder" datasource="sds_dev">
> > INSERT INTO xmlorders
> > VALUES('69', <cfqueryparam value="#xmlString#"
> > cfsqltype="cf_sql_longvarchar">)
> > </cfquery>
>
>
> --
> mxAjax / CFAjax docs and other useful articles:
> http://www.bifrost.com.au/blog/
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289647
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4