Hi Folks

Have anyone on this list come across this Oracle 8 error when inserting
large pieces of text in a LONG field?  Because when I do these large inserts
I am getting the following error message.

-----------------------
Error Occurred While Processing Request
Error Diagnostic Information
Oracle Error Code = 1704

ORA-01704: string literal too long

The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (46:1) to (46:60).
-------------------------

Any ideas on how to get around this either by using a different approach or
by rewriting  the query I am using ....

Any help would be most appreciated...

Thanks
Ian

<cftransaction>

<cfquery name="LOOKUP" datasource="intranetv8">
SELECT Max(eventid) NeweventID
FROM whatson
</cfquery>

<cfif lookup.neweventid is "">
<cfset eventid = 1>
<cfelse>
<cfset eventid = lookup.neweventid + 1>
</cfif>
<!--- Insert contact into the contacts tabel in the tes8 Database --->

<!---- COMBINE MONTH, DAY, AND YEAR INTO A SINGLE VARIABLE ----->
<cfset eventdate = form.event_month & "/" & form.event_day & "/" &
form.event_year>
<cfset eventdate = #CreateODBCDate(eventdate)#>
<cfset eventexpires = form.expires_month & "/" & form.expires_day & "/" &
form.expires_year>
<cfset eventexpires = #CreateODBCDate(eventexpires)#>

<cfset formatted_date = dateformat(eventdate, "MM/DD/YYYY")>
<cfset format_date = dateformat(eventexpires, "MM/DD/YYYY")>


<cfif form.uploadfile neq "">

<cffile action="UPLOAD" filefield="Form.UploadFile"
destination="/export/home/docs/intranet/testpages/"
nameconflict="OVERWRITE">
</cfif>
<!--- Make sure that file is of correct type --->

<cfquery datasource="#Application.DSN#" name="insert_query">
INSERT INTO
whatson (
eventid, eventdate, eventexpires, longtitle, location, telephone, email,
url, description, imgsrc)
VALUES (#eventid#, TO_DATE('#formatted_date#', 'MM/DD/YYYY'),
TO_DATE('#format_date#', 'MM/DD/YYYY'), '#longtitle#', '#location#',
'#telephone#', '#email#', '#url#', '#content#', <cfif
isdefined("file.serverFile")>'#file.serverFile#'<cfelse>NULL</cfif>)
</cfquery>



 </cftransaction>

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to