java - Value of a host variable in the EXECUTE or OPEN statement is out of range error -


i trying insert html content column of table.

this code

string query= "insert mytable (id,html) values (?,?)"; insert = conn.preparestatement(query);  insert.setint(1, id); insert.setstring(2, html); 

this ddl

create table mytab (     id integer not null,     primary key (id),     html varchar (10000)  ); 

i getting below exception while inserting html field.

[8/26/13 4:50:01:344 edt] 00000796 systemout     value of host variable in execute or open statement out of range corresponding use.. sqlcode=-302, sqlstate=22001, driver=3.57.110 

the size of html content pretty big (it might vary in size cannot give exact size).

the reason using varchar is, easy pull in same html content , display on ui rather converting xml , defining xml column in place of varchar column.

can please me out resolve issue?

how large html? i'm pretty sure you'll error when trying insert more 10k bytes.

also seem recall limit on 32k varchar attributes in db2 perhaps need using clob rather varchar...

cheers,


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -