0
Error pasing large CLOB to Oracle
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/td-p/406452
Mar 04, 2008
Mar 04, 2008
Copy link to clipboard
Copied
I am using <cfprocparam> within <cfstoredproc> to
pass a large XML string to an Oracle stored procedure.
The procedure gets called and executes properly when a small amount of XML is passed, but when the string is larger, I get the following error:
Error Executing Database Query.
setString can only process strings of less than 32766 characters. The offending line is below:
I can't find anything that says there's a limit on the size of what I can pass in. Can anyone help me here? Thanks.
The procedure gets called and executes properly when a small amount of XML is passed, but when the string is larger, I get the following error:
Error Executing Database Query.
setString can only process strings of less than 32766 characters. The offending line is below:
I can't find anything that says there's a limit on the size of what I can pass in. Can anyone help me here? Thanks.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406453#M36559
Mar 04, 2008
Mar 04, 2008
Copy link to clipboard
Copied
dianemk wrote:
> I can't find anything that says there's a limit on the size of what I can pass
> in. Can anyone help me here? Thanks.
>
> <cfprocparam type="In" cfsqltype="CF_SQL_CLOB" value="#XML_Notam_Dist_Rules#"
> null="No">
Have you checked the DSN configuration in the administrator? CLOB and
BLOB functionality must be turned on for any given DSN setup. They do
not exist by default.
It's under the 'advanced' control in the DSN configuration form.
> I can't find anything that says there's a limit on the size of what I can pass
> in. Can anyone help me here? Thanks.
>
> <cfprocparam type="In" cfsqltype="CF_SQL_CLOB" value="#XML_Notam_Dist_Rules#"
> null="No">
Have you checked the DSN configuration in the administrator? CLOB and
BLOB functionality must be turned on for any given DSN setup. They do
not exist by default.
It's under the 'advanced' control in the DSN configuration form.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dianemk
AUTHOR
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406454#M36560
Mar 04, 2008
Mar 04, 2008
Copy link to clipboard
Copied
I'll check that, but I don't think it's the case, as my call
works fine when passing smaller amounts of data. It's only when I
pass large amounts that the error occurs.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406455#M36561
Mar 04, 2008
Mar 04, 2008
Copy link to clipboard
Copied
dianemk wrote:
> I'll check that, but I don't think it's the case, as my call works fine when passing smaller amounts of data. It's only when I pass large amounts that the error occurs.
>
Well I presume the smaller amount of data is under the "CLOB" threshold
and therefor works correctly.
> I'll check that, but I don't think it's the case, as my call works fine when passing smaller amounts of data. It's only when I pass large amounts that the error occurs.
>
Well I presume the smaller amount of data is under the "CLOB" threshold
and therefor works correctly.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Engaged
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406456#M36562
Mar 04, 2008
Mar 04, 2008
Copy link to clipboard
Copied
yes - Ian is correct - if you do not check the boxes to
enable large CLOB/BLOB processing then you will be limited to what
you can process.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dianemk
AUTHOR
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406458#M36564
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
First. thanks for your help so far.
I checked the CLOB box in the administrator, but still get the same error. The Administrator help imples that the CLOB box and the associated Long Text Buffer value are for data retrieved from the database, not sent to it. I don't seem to see any parameter(s) which control how much data may be sent to the DB. Can anyone clarify this for me?
Ps - the error I get says "setString can only process strings of less than 32766 characters"
Thanks.
I checked the CLOB box in the administrator, but still get the same error. The Administrator help imples that the CLOB box and the associated Long Text Buffer value are for data retrieved from the database, not sent to it. I don't seem to see any parameter(s) which control how much data may be sent to the DB. Can anyone clarify this for me?
Ps - the error I get says "setString can only process strings of less than 32766 characters"
Thanks.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406459#M36565
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
dianemk wrote:
> Ps - the error I get says "setString can only process strings of less than
> 32766 characters"
>
> Thanks.
>
This may not be a ColdFusion issue. That error rings to me as a DBMS
error with a function that resides inside the stored procedure you are
calling.
> Ps - the error I get says "setString can only process strings of less than
> 32766 characters"
>
> Thanks.
>
This may not be a ColdFusion issue. That error rings to me as a DBMS
error with a function that resides inside the stored procedure you are
calling.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406457#M36563
Mar 04, 2008
Mar 04, 2008
Copy link to clipboard
Copied
Not sure if this will help or not, but I had a similar
problem and I was trying to insert XML into a clob data type and it
was too large. There is a size limit.
I broke it up using dbms_lob.append
http://www.psoug.org/reference/dbms_lob.html
I broke it up using dbms_lob.append
http://www.psoug.org/reference/dbms_lob.html
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dianemk
AUTHOR
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406460#M36566
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
Thanks - I think you're talking about once you get into your
PL/SQL code? My problem seems to be that my object is too large for
Cold Fusion to even pass on to my Oracle Stored Procedure.
I'm still hoping to find some parameter I can tweak (or least a documented limit) on the amount of data that CF can send to Oracle.
I'm still hoping to find some parameter I can tweak (or least a documented limit) on the amount of data that CF can send to Oracle.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mentor
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406461#M36567
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
What version of Oracle? What version of ColdFusion (MX 7, 8,
standard, enterprise, etc.)? Something in the back of my mind
sounds familiar, like there was a problem with drivers and
CLOB/BLOB sizes, but I can't remember which versions it affected,
and I haven't found anything in knowledgebase yet. If I find
anything that looks like it fits, I will forward it on.
Good luck,
Phil
Good luck,
Phil
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dianemk
AUTHOR
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406462#M36568
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
Sorry, I should have put the version info in my first post:
We're using Cold Fusion MX 6.1 and Oracle 10.1
Thanks.
We're using Cold Fusion MX 6.1 and Oracle 10.1
Thanks.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mentor
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406463#M36569
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
I found the thread below, and it looks like the size limit
applied to proc calls but not to queries using cfquery. Sounds like
a bug to me. Is there anyway that you can test this in your
situation by using a cfquery instead, and seeing if it allows you
to pass your large XML?
ORA-01460 cf_sql_clob for cfstoredproc param failed
Phil
ORA-01460 cf_sql_clob for cfstoredproc param failed
Phil
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Mentor
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406464#M36570
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
Standard or enterprise? I believe that there are problems
with CLOBs and using Oracle thin client drivers, but if you are
using the enterprise version of ColdFusion, that shouldn't be a
factor, at least that I am aware of.
Phil
Phil
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dianemk
AUTHOR
New Here
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406465#M36571
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
I'll try <cfquery> and see what happens. Unfortunately,
that isn't a long-term solution for me since my actual stored proc
is complex. I'll report back what happens. Thanks.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
LATEST
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406467#M36573
Apr 01, 2009
Apr 01, 2009
Copy link to clipboard
Copied
quote:
Originally posted by: dianemk
I'll try <cfquery> and see what happens. Unfortunately, that isn't a long-term solution for me since my actual stored proc is complex. I'll report back what happens. Thanks.
If you use JDBC, then execute a call to store procedure via cfscript works.
Sample using Oracle Thin driver.
<!--- text to be insert into a clob field which is larger than 32,767 chars long --->
<cfset someLargeText = "blah...."/>
<cfscript>
OracleTypes = CreateObject("java", "oracle.jdbc.driver.OracleTypes");
CLOB = CreateObject("java", "oracle.sql.CLOB");
ds = CreateObject("java", "oracle.jdbc.pool.OracleDataSource");
ds.setDriverType("thin");
ds.setServerName("HOSTNAME");
ds.setPortNumber("PORT");
ds.setDatabaseNAme("DBNAME");
ds.setUser("USERNAME");
ds.setPassword("PASSWORD");
con = ds.getConnection();
tempClob = CLOB.createTemporary(con, false, CLOB.DURATION_CALL);
tempClob.open(CLOB.MODE_READWRITE);
tempClobWriter = tempClob.getCharacterOutputStream();
tempClobWriter.write(someLargeText);
tempClobWriter.flush();
tempClobWriter.close();
tempClob.close();
cs = con.prepareCall("call pkg_clob_test.ins(?,?)");
cs.setClob(1, tempClob);
cs.registerOutParameter(2, OracleTypes.INTEGER);
cs.execute();
id = cs.getInt(2);
cs.close();
con.close();
WriteOuptut("The ID return by the insert operation is: " & id);
</cfscript>
It is a far from perfect but better then cfquery if your store procedure is complex.
I did email the bug to Adobe's QA team, got a reply from them, then sent them a test case which should fail when it attempt to send a clob via a stored procedure. However, they did ran the test and it pass at their end so maybe the next version (update?) of ColdFusion will fix the cf_sql_clob issue?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/error-pasing-large-clob-to-oracle/m-p/406466#M36572
Mar 05, 2008
Mar 05, 2008
Copy link to clipboard
Copied
dianemk wrote:
> I'll try <cfquery> and see what happens. Unfortunately, that isn't a long-term solution for me since my actual stored proc is complex. I'll report back what happens. Thanks.
>
It is more effort on your part, but it is perfectly allowable to call a
stored procedure with <cfquery...> tags.
Just put the appropriate SQL to do so inside the tag.
> I'll try <cfquery> and see what happens. Unfortunately, that isn't a long-term solution for me since my actual stored proc is complex. I'll report back what happens. Thanks.
>
It is more effort on your part, but it is perfectly allowable to call a
stored procedure with <cfquery...> tags.
Just put the appropriate SQL to do so inside the tag.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

