Commerce Server General - RE: String or binary data would be truncated

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > February 2004 > RE: String or binary data would be truncated





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author RE: String or binary data would be truncated
Erik Mavrinac [MSFT]

2004-02-07, 9:35 am

This corresponds to SQL error DB_E_DATAOVERFLOW, which means that the data supplied to an UPDATE statement was too long for the column it is
being placed in. This probably means that one of the Dictionary fields you have updated in the basket, that corresponds to a table column, has data that is
too long. It is difficult to tell whcih key/column this is from the error message, but your best approach here is to find a basket that can reproduce the problem,
then compare the lengths of strings and other data types that have precisions to their corresponding table column precisions, to find which entry is too long.
Then you'll need to either ensure that the Dictionary key data is not too long when placing it in the Dictionary, or expand the size of the table column to match
the largest size you expect to save to the column.

Erik

--------------------
From: ravisesh_in@indiatimes.com (Ravi Seshadri)
Subject: String or binary data would be truncated
Date: 19 Dec 2003 13:51:00 -0800

Hi,
When i try to place an order, occasionally i am getting the following
error:
String or binary data would be truncated.
I am using CS2002/Windows 2000/SQL Server2000
Thanks

Ravi

Following is the message i get:
System.Runtime.InteropServices.COMException (0x80040E57): String or
binary data would be truncated.[22001]
The statement has been terminated.[01000]

String or binary data would be truncated.
at Microsoft.CommerceServer.Interop.Orders.DBStorageClass.InsertData(Object
vtReserved, Object pdispData)
at Microsoft.CommerceServer.Interop.Orders.MTSHelperImpl.SaveDictToTable(Int16&
bExists, IDictionary& dict, String& table, String& key, Object&
exception, Object& exception2, DBStorage& dbs, Boolean&
bReinitializeDBS, String& SavePrefix, String& dsn, String& userid)
at Microsoft.CommerceServer.Interop.Orders. PrivateOrderGroupMtsTxHelperFreeThreaded
.Save(LoadedFromState
my_save_to, String SavePrefix)
at Microsoft.CommerceServer.Interop.Orders. PrivateOrderGroupMtsTxHelperFreeThreaded
.SaveAsOrderHelper(Object
in_User, Object in_dsn, Object in_GenID, Object&
in_out_OrderGroupData, Object& loaded_from, Object&
in_out_exists_in_databse, Object SavePrefix, Object&
out_vtOutTrackingNumber)

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com