Subsonic 2.2 varchar2 maxlength 问题

发布于 2024-10-23 01:06:49 字数 1027 浏览 3 评论 0原文

我在将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

短叹 2024-10-30 01:06:49

这可能意味着您正在插入多字节数据。
尝试将字段定义更改为: 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.

深居我梦 2024-10-30 01:06:49

我将字段定义更改为 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文