• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sql inserting large String

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks in advance.
Can any one pls help me in this problem.
I am trying to get a very large String from foxpro db(connected using JDBCODBC DRIVER)and trying to insert this string in sql table,using preparedStatement method setString.But sql is not allowing to insert this much big string.Simply raising null pointer exception.I could able retrieve the string from foxpro.Inserting to sql is the problem
Thanks
Riya
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is really nore appropriate to the JDBC forum, so I've moved it for you.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frank
If the String is extremely large (anyone have an idea on the limit for this?) you'll probably have to store it as a BLOB (or related), not a String.
Dave.
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe it is 2K (it may be higher like 4k for newer versions of Oracle). If you were looking for some source code, there's plenty on the Oracle site:
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html and click on "JDBC Advanced Features Samples" to find LOB examples.
Jamie
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
maybe the reason is just that VARCHAR is limited to 255 chars while TEXT is unlimited (in some sort - i mean: i don't know what's its limit ;-) ). so if your setting the datatype to some varchar thing, change it to TEXT. (sorry, if thats way out of the range of your question, you didn'tspecify any size.)
chantal
 
riya chacko
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
destination datatype is text of length 16 only.not varchar.
The length of the string is 2048618.
This much big string sql is not allowing to insert.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic