aspose file tools*
The moose likes JDBC and the fly likes Boolean datatype Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Boolean datatype" Watch "Boolean datatype" New topic
Author

Boolean datatype

Pradeep Guru
Greenhorn

Joined: Nov 26, 2003
Posts: 3
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

Joined: May 10, 2001
Posts: 3244
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!!


Dave
Pradeep Guru
Greenhorn

Joined: Nov 26, 2003
Posts: 3
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

Joined: Jan 10, 2002
Posts: 60071
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
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

Joined: Nov 26, 2003
Posts: 3
Thanks Dave
I am using JDBC2.0. Any clues on how to call that function in JDBC2.0.
Thanks
Pradeep
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Boolean datatype
 
Similar Threads
Dropping leading zeros on numeric field
RowType in Java???
How to set a boolean CMP field?
RowType in Java???
wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATUS'