首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

c++报错:Input string value is too large to fit into the buffer解决思路

2012-03-12 
c++报错:Input string value is too large to fit into the buffer[DBERR 错误:Input string value is too

c++报错:Input string value is too large to fit into the buffer
[DBERR 错误:Input string value is too large to fit into the buffer : 
insert into temp_info (c1,c2,c3,c4,c5,c6,c7) values(:c1 ,:c2,:c3,to_date(:c4,'YYYYMMDDHH24MISS' ),:c5,:c6,:c7) : Variable: :c7<CHAR>, datatype in operator <</>>: CHAR] 

数据库中针对c7是这样定义的:
create table temp_info (
  c1 NUMBER(18) not null,
  c2 NUMBER(5) not null,
  c3 VARCHAR2(10) not null,
  c4 DATE not null,
  c5 VARCHAR2(20) not null,
  c6 NUMBER(5) not null,
  c7 VARCHAR2(2047)
)

程序插入时:
insert into temp_info (c1,c2,c3,c4,c5,c6,c7) values(:c1<LONG>,:c2<int>,:c3<char[10+1]>,to_date(:c4<char[15]>,'YYYYMMDDHH24MISS'\
),:c5<char[20+1]>,:c6<INT>,:c7<char[2047+1]>)

[解决办法]

探讨
正解。


引用:

C/C++ code

c3 VARCHAR2(10) not null //这里定义了10

c3<char[10+1]>//插入了11

热点排行