This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Data size bigger than the max size for this type;  RSS feed

 
grace chow
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ,
When I insert data into blob and long raw field of oracle database table.
always having the error:
java.sql.SQLException: Data size bigger than max size for this type:

I am using Oracle 9i. and I know that my program code in Oracle 8 is fine without any error..
Therefore, the problem occurs in Oracle 9i. Do you have any suggestion that I have to modify my program code in order to fit the Oracle 9i.

Thanks,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LONG RAW is a legacy data type in Oracle. Use an appropriate LOB datatype instead - LONGs can store 2GB, LOBs can store 4GB (plus there are other good reasons for favouring LOB over LONG RAW, which you will be able to read about in the Oracle documentation).
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best reason of using LOB over LONG RAW is, you can only have one column of type LONG RAW in your table, on the other hand LOB is not like that.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!