如题,在表中未对列扩展类型为文件列或图片列进行设置,

此主题相关图片如下:qq截图20140412171858.jpg

项目属性中的Initialize事件中期望通过代码对其进行统一设置,代码如下:
For Each dt As DataTable In DataTables
For Each dc As DataCol In dt.DataCols
If dc.ExtendType=ExtendTypeEnum.images OrElse dc.ExtendType=ExtendTypeEnum.file OrElse dc.ExtendType=ExtendTypeEnum.files Then
dc.Remote=True
dc.FTPClient.Host="192.168.0.95"
dc.FTPClient.Account="account"
dc.FTPClient.password ="password"
End If
Next
Next
但在项目打开时出现错误提示:

此主题相关图片如下:初始化异常.jpg

我试了下,如果在列属性中将某列的扩展类型进行了设置以后,则此列在Initialize事件中运行时不会报错,而未设置的则会报错.
这样的问题如何解决
[此贴子已经被作者于2014-4-12 17:19:31编辑过]