参数'Length'必须大于或等于零。 [英] Argument 'Length' must be greater or equal to zero.

查看:1482
本文介绍了参数'Length'必须大于或等于零。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果Len(Row.Area)> 0然后

            Row.pCommunity = Right(Row.Area,Len(Row.Area) - 4)

       结束如果

If Len(Row.Area) > 0 Then
            Row.pCommunity = Right(Row.Area, Len(Row.Area) - 4)
        End If

当我在脚本任务中的ssis包中运行时,我收到此错误。

When i run this in the ssis package within script task i am getting this error.

我们的区域就像是 

We are scarpping area like 

7 - 清湖区以清理湖区

7 - Clear Lake Area to clear lake area

推荐答案

  ;这表明下面的粗体部分会出现一个小于零的负数。

 That would suggest that the part in bold below is coming up with a negative number which is less than zero.

Row.pCommunity = Right(Row.Area, Len(行) .Area) - 4

Row.pCommunity = Right(Row.Area, Len(Row.Area) - 4)

 不确定你在做什么或者什么是"Row.Area"但是, 如果你要从中减去4, 你需要确保Row.Area至少是4开始....

 Not sure what it is that you are doing or what "Row.Area" is but,  if you are going to subtract 4 from it,  you need to make sure Row.Area is at least 4 to begin with....

    如果Len(Row.Area)> 3然后

         Row.pCommunity = Right(Row.Area,Len(Row.Area) - 4)

   结束如果

    If Len(Row.Area) > 3 Then
         Row.pCommunity = Right(Row.Area, Len(Row.Area) - 4)
    End If


这篇关于参数'Length'必须大于或等于零。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆