Hi

I am having problems with oracle and its character restrictions when
inserting more than 2000 characters in a LONG field and 4000 in Varchar 2
field.

I have come across the following article on the allaire site

http://www.allaire.com/Handlers/index.cfm?ID=11433&Method=Full

but it does not explain the correct process very well? I would kindly
appreciate it if any other users have had this problem and the solution they
used to overcome this?

However

I have a SQL statement that overcomes this problem to a degree but all
fields must be filled in in the form or the data in one of the fields  is
not inserted into the database ? shown in the snippe below #mainstory#

----------snippet------------
DECLARE new_text LONG;
BEGIN
new_text := '#content#';

UPDATE staff_messages
SET mainstory = new_text
-----------------------------------

The full insert is shown below

<!--- Insert contact into the contacts tabel in the Database --->

<cfset storydate = form.event_month & "/" & form.event_day & "/" &
form.event_year>
<cfset storydate = #CreateODBCDate(storydate)#>
<cfset formatted_date = dateformat(storydate, "MM/DD/YYYY")>
<cfset content = REReplacenocase(content, "</*font[^<>]*>", "", "ALL")>

<!--- Insert the story record --->
<cfquery datasource="#Application.DSN#" name="insert_query">
INSERT INTO staff_messages
(id, storydate, headline, fp_headline, fp_summary, directorate)
VALUES (#id#, TO_DATE('#formatted_date#', 'MM/DD/YYYY'), '#headline#',
'#fp_headline#', '#fp_summary#', '#directorate#')
</cfquery>

<!--- Insert the long text field into the story record --->
<cfquery datasource="#Application.DSN#" name="insert_query">
DECLARE new_text LONG;
BEGIN
new_text := '#content#';

UPDATE staff_messages
SET mainstory = new_text
WHERE id = #id# and headline = '#headline#' and fp_headline =
'#fp_headline#' and fp_summary = '#fp_summary#' and directorate =
'#directorate#' and storydate = TO_DATE('#formatted_date#', 'MM/DD/YYYY');
END;
</cfquery>


Any other solutions ?

Thanks

Ian





Referring URL 1:
http://www.allaire.com/Handlers/index.cfm?ID=11433&Method=Full

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to