how can I show the correct word?

gdy1039 2003-09-14 08:14:43
Hello,all:

I run this script.
create table a (c1 nvarchar2(10));
insert into a values ('aaaa');

Then I make data block about table a,then query it in a base form. But when I execute,the result is "####" instead of "aaaa".

Does anybody can tell me why and how to resolve? Thanks so much.

My environment is:
Oracle 9i Database 9.2.0.1.0
Form builder 6.0.8.11.3
WIN2K Advanced Server English Version
System Default Language is: simplified Chinese
Database Character set is default when setup.
...全文
59 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
'Alan 2003-09-16
  • 打赏
  • 举报
回复
应该是item的属性问题,max length 再加大呢?
再有,建议你用varchar2 可变型代替nchar
gdy1039 2003-09-16
  • 打赏
  • 举报
回复
I have try to make canvas->frame->item->property->data->Maximun length The same as the length of the column in table. But it doesn't work.

See this.
create table t2 (c1 char(1), c2 char(2), c3 nchar(1), c4 nchar(2));
insert into t2 values ('a', 'bb', 'c', 'dd');
then the query result is "a, bb, #, ##"
maybe the problem is in unicode.

But I still can't correct it.
gdy1039 2003-09-16
  • 打赏
  • 举报
回复
To:znbalan()
Max Length再大也是不正常显示.根据实验,它好像只产生如下影响.
canvas->frame->item->property->data->Maximun length 表示文本输入项里可输入文本的长度.

canvas->frame->item->property->data->fixed length 如果为YES,则只当输入Maximun Length指定长度的信息时表单才会执行,执行后再传给数据库,由数据库决定是否插入.如果为NO,则无论输入信息的长度是多少,表单都会执行,但是否成功由数据库决定.


To: ColinGan(浪子)
不是说为了更好兼容更多字符类型,建议用UNICODE字符的吗?

今天下午又有更奇怪的结果:
如果在表单里把一个中文字保存到一个VARCHAR2(100)里,那再次SELECT出来就会变乱码,无论从表单还是SQLPLUS.
如果在SQLPLUS里把一个中文字保存到一个VARCHAR2(100)里,那从表单里SELECT不出来.而从SQLPLUS里则很正常.

请问楼上两位朋友你们在DEVELOPER里用中文很正常吗?如果不正常请写写你们的经验好不好?
ColinGan 2003-09-16
  • 打赏
  • 举报
回复
对于字段类型nchar,nvarchar,nvarchar2是oracle9i才有的

用以上3种类型的字段的值是隐式的
如果你不需要进行自动加密等方式,建议用
char,varchar,varchar2等类型替换
gdy1039 2003-09-15
  • 打赏
  • 举报
回复
UP
gdy1039 2003-09-14
  • 打赏
  • 举报
回复
To: more_zou
Of course the result of "select * from a" is "aaaa" in sqlplus
more_zou 2003-09-14
  • 打赏
  • 举报
回复
what is the result in sqlplus?

17,078

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧