Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SQLSTATE = 22001 Data would be truncated (OLE DB)...

36 views
Skip to first unread message

gabysolares

unread,
Nov 17, 2006, 10:26:54 AM11/17/06
to
Good Morning everybody,

I just migrated my PB 6.5 application to PB 10.5. When my
user tries to insert a record and save I get the error
bellow. If I sign in with my login and password and attempt
to save it works perfectly (I have administrator rights in
NT and are a normal user in Sql Server).

Somebody suggested for me to add "DisableBind=1" to my
DBPARM which I did. I strongly believe this has to do with
OLE DB base in the fact that my users insert hundreds of
rows daily with my old application in PB 6.5 pointing
exactly to the same DB.

Why would it want to truncate data with some users and not
with others?

Can somebody please help me?

SQLSTATE = 22001
Microsoft OLE DB Provider for SQL Server
String or binary data would be truncated.
No changes made to database.
INSERT INTO Dba.InvoiceHead ( DesticonLocation,
InvoiceNumber, RevisionNumber, CustomerCode, Consignee,
CareOfParty, DestinationCity, DestinationState,
CustomerReference1, CustomerReference2, ModeType, CarType,
Routing, RoutingVia, DeliveryCarrier, ProductDescription,
OrderDate, WeekDue, DesticonRep, TallyTemplate,
ShipmentVolume, ShipmentWeight, ShipmentRevenue,
MinimumCharges, OtherCharges, ShipmentUOM, ShipmentCost,
InvoiceCurrency, SalesExchangeRate, GstAmount, PstAmount,
FuelSurCharges, MinimumVolume, RateDefault, RevenueTotalCdn,
RevenueTotalUs, RailCostTotalCdn, RailCostTotalUs,
OtherCostTotalCdn, OtherCostTotalUs, Inventory, ReadyToBill,
Invoiced, BillOn, TruckCost, MinimumChargesCdn,
MinimumChargesUs, OtherChargesCdn, OtherChargesUs,
tax_group_id, CommodityQualifierNumber, Qualifier1 ) VALUES
( 2, 461232, 1, 'WEBA01', 'WEYERHAEUSER CANADA LTD.', '',
'CARROLLTON ', 'TX', 'S-10896', 'MARK', 'R', 'CB73', 'BNSF',
'S', 'DGNO', 'WRC', {ts '2006-11-16 00:00:00.000'}, {ts
'2006-11-20 10:36:48.830'}, 'WBRENT', 'STD', 0.000, 185000,
0.00, 0.00, 0.00, 'FBM', 0.00, 'US', 1.1231, 0.00, 0.00,
0.00, 0.000, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,
'WEBA01', 'N', 'N', 'O', 0.00, 0.00, 0.00, 0.00, 0.00,
'S-GST EXEMPT', '2421184', 'WM' )

Rafael Lenartowicz

unread,
Dec 12, 2006, 9:24:56 AM12/12/06
to
imho - there is nothing wrong with your DBParm. This message indicates,
that a varchar column is defined with smaller size than your insert value -
i.e.
in a column is defined as varchar(4) and your insert tries to write a value
'THISISTOOLONG'
in it - you'll get this error.
r
<Gaby Solares> wrote in message news:455de2ce.102...@sybase.com...
0 new messages