• 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

Insert statement not inserting correct value

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am trying to insert a record into Oracle-8 database using JDBC. For a particular column somehow the data is inserted partially. This colum is of type VARCHAR2(256) . I could successfully insert comma seperated values say 'CA,GA,CO' . But when I try to insert the value like 'Exclude CA,GA,CO' it inserts only 'Exclude '. When I run this insert statement using sql*plus, it inserts fine . but inserts partially as said above when I try to insert through JDBC using
stmt.executeUpdate(sqlStmt);
Just before executing this statement in my java code, I am printing out the insert statement and it looks fine.
Any idea why???
Thanks in advance,
Seema
[ June 26, 2002: Message edited by: Seema Hanji ]
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seema
Can you post the insert statement that is printed out? Also, are there any ' in it? Those can give you a problem if they are not properly escaped.
Just to clarify, you're putting comma separated data all into the same column not into multiple columns right?
 
reply
    Bookmark Topic Watch Topic
  • New Topic