Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing null from Jdbc to Oracle(URGENT)

 
nandkishor rao
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to pass null to Oracle database from Jdbc
so my question is can I pass a "null" as a String?(Like pstmt.setString(3, "null");
Will it make any difference? Let me know am i right or not
and some other ways by which we can pass null value.
Thanks
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you write your code like this


so "null" is a value like anything you write inside double qoutes.

your null assinging code would be like this.. but make sure you have already allowed null in your database column.
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would recommend that you do like this



Shailesh
 
nandkishor rao
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic