【发布时间】:2018-11-17 19:52:46
【问题描述】:
我安装了旧版 Sitefinity(6.3 版) 在个人资料上,我有一个数字自定义字段。我现在需要将其更改为保存字符串。
我发现没有简单的方法来更改数据类型 (https://www.progress.com/documentation/sitefinity-cms/edit-an-existing-custom-field),但是可以通过代码/配置来实现吗?
我猜一个选项是删除该字段,然后重新创建它是可能的,但是由于我有很多数据,因此要恢复该字段中的数据需要做很多工作。这是唯一的方法吗?
编辑:我已删除该列并将其重新创建为字符串/varchar。 我现在遇到了某种转换器的问题
type converter initialization failed. The converter with name 'DecimalConverter' does not convert from CLR type 'System. String' to SQL type 'DECIMAL'.
Parameter name: converterName
Actual value was OpenAccessRuntime.Data.DecimalConverter, Telerik.OpenAccess.Runtime, Version=2013.3.1211.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342.
堆栈跟踪中的这一行很重要
[MetadataException: The metadata for field 'CustomerNo_sv' of class 'Telerik.Sitefinity.Security.Model.SitefinityProfile' cannot be initialized: Type converter initialization failed. The converter with name 'DecimalConverter' does not convert from CLR type 'System. String' to SQL type 'DECIMAL'.
Parameter name: converterName
Actual value was OpenAccessRuntime.Data.DecimalConverter, Telerik.OpenAccess.Runtime, Version=2013.3.1211.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342.]
正如我所见,语言指定的值没有被转换。现在整个站点都关闭了,我无法访问后端。所以我想我必须在数据库中解决这个问题?
【问题讨论】:
标签: sitefinity