100分,拿得太轻松了。

aarondella 2004-07-09 11:52:55
对于Oracle是新手。
想请教一个问题。
表 tb_table 结构: 字段一 orderID varchar2(5)
字段一 mainInFo clob

请问我怎样把东西写进去和读出来。用sql语句写不进。
然后我用procedure又老报错。

最好能给出代码参考,马上结帖。
多谢。
...全文
254 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanger8689 2004-07-14
  • 打赏
  • 举报
回复
clob型 的字段宽度为4000
你要想插入的话,必须定义宽度超过4000的类型
dinya2003 2004-07-14
  • 打赏
  • 举报
回复
C#操作类似insert into tb_table values('343','wpoerpqowerupoiqwer')的语句是可以的.
aarondella 2004-07-13
  • 打赏
  • 举报
回复
现在我想要,如果是clob型的字段,你们用什么insert 的?
各位帮帮忙。
aarondella 2004-07-13
  • 打赏
  • 举报
回复
客户端是C#
8193102 2004-07-12
  • 打赏
  • 举报
回复
不知道你的客户端用什么开发工具,如果是PB, 那么在PB中有这个update blob之类的东东可以解决,
sunnyrain 2004-07-12
  • 打赏
  • 举报
回复
word本身是带格式的,它的格式里面可能带有oracle的保留字了吧
ytnice 2004-07-12
  • 打赏
  • 举报
回复
up
aarondella 2004-07-11
  • 打赏
  • 举报
回复
多谢各位帮忙


to dinya2003
insert into tb_table values('343','wpoerpqowerupoiqwer')

单执行这一句可以

to zonelive
select * from tb_name 也可以查出内容


短的可以插进去。
我用一篇word拷进去就不行。
sunnyrain 2004-07-11
  • 打赏
  • 举报
回复
ToString 不支持4000吧
zonelive 2004-07-11
  • 打赏
  • 举报
回复
这样呢:
select * from tb_name
dinya2003 2004-07-10
  • 打赏
  • 举报
回复
如果单执行这一句的话会有问题吗?
insert into tb_table values('343','wpoerpqowerupoiqwer')
aarondella 2004-07-09
  • 打赏
  • 举报
回复
多谢,不过这个不可以,我的maininfo 有一般有10000字左右,还有各种符号。
就是在word中做好贴进去的。执行时老是报错:ORA-01704 文字字符串过长。
welyngj 2004-07-09
  • 打赏
  • 举报
回复
insert into tb_table values('343','qwoepriuqwoeriuqwpoerpqowerupoiqwer')
aarondella 2004-07-09
  • 打赏
  • 举报
回复
orderID是主键,maininfo是要插入或读取的字段。
大虾们,帮帮忙啦。
atao245993 2004-07-09
  • 打赏
  • 举报
回复
"insert into tb_table values('"+competecode.ToString()+"','"+maininfo.ToString()+"')"

或者将'"+maininfo.ToString()+"换成一个字符串先试试看
aarondella 2004-07-09
  • 打赏
  • 举报
回复
各位帮帮忙啦!!!!
aarondella 2004-07-09
  • 打赏
  • 举报
回复
是clob的,我知道它可以支持4G.但是我用insert into tb_table values('"+competecode.ToString()+"','"+maininfo.ToString()+"')报错。
那如果是clob型的字段,你们用什么insert 的?
daydayupliq 2004-07-09
  • 打赏
  • 举报
回复
真的是clob类型么?它可以支持上G的数据的呀!
dinya2003 2004-07-09
  • 打赏
  • 举报
回复
ORA-01704 string literal too long

Cause: The string literal is longer than 4000 characters.

Action: Use a string literal of at most 4000 characters. Longer values may only be entered using bind variables.

你的maininfo是clob类型的吗?执行的错误显示,不能超过4000个字符.
aarondella 2004-07-09
  • 打赏
  • 举报
回复
帮帮忙啦!

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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