• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Boolean datatype

 
Pradeep Guru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have one oracle stored function as
function is_required(
id number,
name varchar2
)
returns boolean is
.....
.....
end is_required;
How can I call this function from jdbc? I dont have equivalent dataype in jdbc. Please let me know if any equivalent datatype available in Oracle extension to JDBC data types
Thanks in anticipation
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PK G.
Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
 
Pradeep Guru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i am expecting is answers to query i posted. anyways updated my profile, not sure though how does it matter
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for changing your profile. And yes, it matters.
Unfortunately, the new name you chose doesn't comply with the Naming Policy either. Please update your profile with a display name that contains a first and a last name separated by a space character. The first name can be an initial, but not the last name.
If you have further questions regarding the JavaRanch policy, there is a forum for discussin JavaRanch issues here.
thanks,
bear
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep
Which JDBC version are you using? JDBC 3.0 has a Boolean data type. You can use the getBoolean() method in the resultSet class to retrieve a boolean value from a database.
Hope that helps
 
Pradeep Guru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dave
I am using JDBC2.0. Any clues on how to call that function in JDBC2.0.
Thanks
Pradeep
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pradeep
I know that JDBC 2.0 also had the getBoolean function but it applied to bit fields not true boolean fields. I would check with either the driver vendor or the database vendor and see if they have any Oracle to Java equivalence. Sorry not much help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic