I think the error message is straight forward,
that is you are trying to insert string that's longer than your datatype 
can handle.

For example:
Field: MessageTitle (16): You are trying to insert: "Some text to throw 
error" which has 24 characters.

Try to increase the length of the field in your DB.

HTH,
Rizal


At 09:58 PM 10/28/2002, you wrote:
>**********************************************************************
>WESTMINSTER CITY COUNCIL
>Please refer to the disclaimer beneath this message
>**********************************************************************
>
>Hi,
>
>I have a SQL Server 7 database and I am trying to insert a large amount of
>text, passed by a ColdFusion form, into a table within this database.
>
>The problem I am having is a "ODBC Error Code = 22001 (String data right
>truncation)" error.
>My table design is like this.
>         Column name     Datatype        Length
>         MessageID       int             4
>         MessageType     char            20
>         Department      char            20
>         CreationDate    char            15
>         PublicationDate char            15
>         MessageTitle    text            16
>         MessageTeaser   text            16
>         MessageBody     text            16
>I think that the problem is when the text is being added to the fields,
>MessageTitle, MessageTeaser and MessageBody.
>This is the complete error message:
>
>ODBC Error Code = 22001 (String data right truncation)
>[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would
>be truncated.
>SQL = "INSERT INTO Messages ( MessageType, Department, CreationDate,
>PublicationDate, MessageTitle, MessageTeaser, MessageBody, Status ) VALUES (
>'None', 'Housing', '28/10/2002', 'Awaiting', 'Some text to throw error',
>'Some text to throw error, Some text to throw error', 'Some text to throw
>error,Some text to throw error and Some text to throw error', 'Awating
>Approval' )"
>Data Source = "WIRE_USERS"
>The error occurred while processing an element with a general identifier of
>(CFQUERY), occupying document position (24:1) to (24:57) in the template
>file E:\INETPUB\WWWROOT\WIRE\MESSAGES\SENDFORAPPROVAL.CFM.
>Anyone know how I can fix this error?
>Thanks
>Stephen
>
>
>
>**********************************************************************
>Westminster City Council switchboard:
>+44 20 7641 6000
>**********************************************************************
>This E-Mail may contain information which is
>privileged, confidential and protected from
>disclosure. If you are not the intended recipient
>of this E-mail or any part of it, please telephone
>Westminster City Council immediately on receipt.
>You should not disclose the contents to any other
>person or take copies.
>**********************************************************************
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to