Subsonic 2.2 varchar2 maxlength 问题
我在将 4000 个字符保存到 varchar2(4000) oracle 10g 列时遇到问题 它只允许我保存 2000 个字符,当我尝试保存超过 2000 个字符时,
我收到错误
Can't save: GENERAL_ NOTE超出最大长度 4000
这是亚音速列定义 TableSchema.TableColumn colvarGeneralNote = new
TableSchema.TableColumn(模式); colvarGeneralNote.ColumnName = "GENERAL_NOTE"; colvarGeneralNote.DataType = DbType.String; colvarGeneralNote.MaxLength = 4000; colvarGeneralNote.AutoIncrement = false; colvarGeneralNote.IsNullable = true; colvarGeneralNote.IsPrimaryKey = false; colvarGeneralNote.IsForeignKey = false; colvarGeneralNote.IsReadOnly = false; colvarGeneralNote.DefaultSetting = @""; colvarGeneralNote.ForeignKeyTableName = ""; schema.Columns.Add(colvarGeneralNote);
我无法将超过 2000 个字符的字符串保存到我的 varchar2(4000) 列中,
请就该问题向我提供建议,
谢谢 - Adem
I have a problem with saving 4000 characters to varchar2(4000) oracle 10g column
it lets me save just 2000 characters and when I try to save exceeding 2000 character
I get tihs error
Can't save: GENERAL_ NOTE exceeds the maximum length of 4000
this is subsonic column definition
TableSchema.TableColumn colvarGeneralNote = new
TableSchema.TableColumn(schema);
colvarGeneralNote.ColumnName = "GENERAL_NOTE";
colvarGeneralNote.DataType = DbType.String;
colvarGeneralNote.MaxLength = 4000;
colvarGeneralNote.AutoIncrement = false;
colvarGeneralNote.IsNullable = true;
colvarGeneralNote.IsPrimaryKey = false;
colvarGeneralNote.IsForeignKey = false;
colvarGeneralNote.IsReadOnly = false;
colvarGeneralNote.DefaultSetting = @"";
colvarGeneralNote.ForeignKeyTableName = "";
schema.Columns.Add(colvarGeneralNote);
I can't save a string with exceeding 2000 characters to my varchar2(4000) column
Please advise me for that issue
Thanks - Adem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能意味着您正在插入多字节数据。
尝试将字段定义更改为: varchar2(4000 char)
数据库和字符集中的 nls_length_semantics 是什么。
it could mean that you are inserting multi-byte data.
try changing field definition to : varchar2(4000 char)
also what is nls_length_semantics in your db and the Characterset.
我将字段定义更改为 varchar2(4000 char) 并将我的数据库设置如下 NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
我还发现,当字符数在 2000 到 4000 之间时,出现 ORA-01460: unimplemented or unreasonable conversion requested 错误,当字符数高于 4000 时,出现 Can't save: GENERAL_ NOTE超出最大长度 4000 错误现在
谢谢阿德姆
I changed field definition to varchar2(4000 char) and my db settings as follows NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
I also find that when characters when charactes count between 2000 and 4000 I got ORA-01460: unimplemented or unreasonable conversion requested error and when character count higher than 4000 I got Can't save: GENERAL_ NOTE exceeds the maximum length of 4000 error Now
Thanks Adem