保存组织提示:将截断字符串或二进制数据。
举例的错误日志:
错误信息:null
Caused exception message is: Sql222 execute exception : insert into T_ORG_Admin (
FID,
FName_L1,
FName_L2,
FName_L3,
FNumber,
FDescription_L1,
FDescription_L2,
FDescription_L3,
FSimpleName,
FIsGrouping,
FEffectDate,
FInvalidDate,
FIsFreeze,
FIsCompanyOrgUnit,
FIsAdminOrgUnit,
FIsSaleOrgUnit,
FIsPurchaseOrgUnit,
FIsStorageOrgUnit,
FIsProfitOrgUnit,
FIsCostOrgUnit,
FIsCU,
FIsUnion,
FIsHROrgUnit,
FCreatorID,
FCreateTime,
FLastUpdateUserID,
FLastUpdateTime,
FControlUnitID,
FIsLeaf,
FLevel,
FLongNumber,
FParentID,
FIsEntity,
FIsVirtual,
FPhoneNumber,
FLayerID,
FResponPositionID,
FAddressID,
FAreaID,
FPrincipalID,
FLayerTypeID,
FBaseDuty_L1,
FBaseDuty_L2,
FBaseDuty_L3,
FIndex,
FJobSystemID,
FAdminAddress_L1,
FAdminAddress_L2,
FAdminAddress_L3,
FZipCode,
FFax,
FIsSealUp,
FIsStart,
FIsOUSealUp ,
FDisplayName_L1,
FDisplayName_L2,
FDisplayName_L3,
FPropertySealUpDate,
FVersionNumber,
FCode,
FIsTransportOrgUnit,
FIsQualityOrgUnit,
FIndustryID,
FSortCode,
FEconomicType,
FRegisteredCapital,
FRegisteredCode,
FSetupDate,
FEndupDate,
FTaxNumber,
FOrgCode,
FIsChurchyard,
FJuridicalPersonID,
FIsJuridicalCompany,
FIsIndependence,
forgTypeStr,
FTerritory_L1,
FTerritory_L2,
FTerritory_L3)
SELECT
ou.FID,
ou.FName_L1,
ou.FName_L2,
ou.FName_L3,
ou.FNumber,
ou.FDescription_L1,
ou.FDescription_L2,
ou.FDescription_L3,
ou.FSimpleName,
ou.FIsGrouping,
ou.FEffectDate,
ou.FInvalidDate,
ou.FIsFreeze,
ou.FIsCompanyOrgUnit,
ou.FIsAdminOrgUnit,
ou.FIsSaleOrgUnit,
ou.FIsPurchaseOrgUnit,
ou.FIsStorageOrgUnit,
ou.FIsProfitOrgUnit,
ou.FIsCostOrgUnit,
ou.FIsCU,
ou.FIsUnion,
ou.FIsHROrgUnit,
ou.FCreatorID,
ou.FCreateTime,
ou.FLastUpdateUserID,
ou.FLastUpdateTime,
adm.FControlUnitID,
stru.FIsLeaf,
stru.FLevel,
stru.FLongNumber,
stru1.FUnitId AS FParentID,
adm.FIsEntity,
adm.FIsVirtual,
adm.FPhoneNumber,
adm.FLayerID,
adm.FResponPositionID,
adm.FAddressID,
adm.FAreaID,
adm.FPrincipalID,
adm.FLayerTypeID,
adm.FBaseDuty_L1,
adm.FBaseDuty_L2,
adm.FBaseDuty_L3,
adm.FIndex,
adm.FJobSystemID,
adm.FAdminAddress_L1,
adm.FAdminAddress_L2,
adm.FAdminAddress_L3,
adm.FZipCode,
adm.FFax,
adm.FIsSealUp,
ou.FIsStart,
ou.FIsOUSealUp,
stru.FDisplayName_L1,
stru.FDisplayName_L2,
stru.FDisplayName_L3,
adm.FPropertySealUpDate,
ou.FVersionNumber,
ou.FCode,
ou.FIsTransportOrgUnit,
ou.FIsQualityOrgUnit,
adm.FIndustryID,
stru.FSortCode,
adm.FEconomicType,
adm.FRegisteredCapital,
adm.FRegisteredCode,
adm.FSetupDate,
adm.FEndupDate,
adm.FTaxNumber,
adm.FOrgCode,
adm.FIsChurchyard,
adm.FJuridicalPersonID,
adm.FIsJuridicalCompany,
adm.FIsIndependence,
ou.forgTypeStr,
adm.FTerritory_L1,
adm.FTerritory_L2,
adm.FTerritory_L3
FROM T_ORG_BaseUnit ou INNER JOIN
T_ORG_Structure stru ON ou.FID = stru.FUnitId LEFT OUTER JOIN
T_ORG_Structure stru1 ON stru.FParentID = stru1.FID INNER JOIN
T_ORG_OUPartAdmin adm ON ou.FID = adm.FUnitID
WHERE (stru.FTreeId = '00000000-0000-0000-0000-0000000000034F2827FD')
and (ou.fid=? OR stru.flongnumber like ?)
Caused exception message is: 将截断字符串或二进制数据。
解决方案:
alter table t_org_admin alter column FDisplayName_L1 nvarchar(500)
alter table t_org_admin alter column FDisplayName_L2 nvarchar(500)
alter table t_org_admin alter column FDisplayName_L3 nvarchar(500)
如果现场各级组织的名称较长,导致长名称的最大长度不够用的话,可以参考上述脚本,适当提高长名称的最大长度。
保存组织提示:将截断字符串或二进制数据。
本文2024-09-22 20:01:45发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-110988.html