IResultSet.GetBoolean Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetBoolean(Int32) |
Retrieves the value of the designated column in the current row
of this |
GetBoolean(String) |
Retrieves the value of the designated column in the current row
of this |
GetBoolean(Int32)
Retrieves the value of the designated column in the current row
of this ResultSet
object as
a boolean
in the Java programming language.
[Android.Runtime.Register("getBoolean", "(I)Z", "GetGetBoolean_IHandler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool GetBoolean (int columnIndex);
[<Android.Runtime.Register("getBoolean", "(I)Z", "GetGetBoolean_IHandler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetBoolean : int -> bool
Parameters
- columnIndex
- Int32
the first column is 1, the second is 2, ...
Returns
the column value; if the value is SQL NULL
, the
value returned is false
- Attributes
Exceptions
if a database error happens.
Remarks
Retrieves the value of the designated column in the current row of this ResultSet
object as a boolean
in the Java programming language.
If the designated column has a datatype of CHAR or VARCHAR and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 0, a value of false
is returned. If the designated column has a datatype of CHAR or VARCHAR and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 1, a value of true
is returned.
Java documentation for java.sql.ResultSet.getBoolean(int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetBoolean(String)
Retrieves the value of the designated column in the current row
of this ResultSet
object as
a boolean
in the Java programming language.
[Android.Runtime.Register("getBoolean", "(Ljava/lang/String;)Z", "GetGetBoolean_Ljava_lang_String_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool GetBoolean (string? columnLabel);
[<Android.Runtime.Register("getBoolean", "(Ljava/lang/String;)Z", "GetGetBoolean_Ljava_lang_String_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetBoolean : string -> bool
Parameters
- columnLabel
- String
the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column
Returns
the column value; if the value is SQL NULL
, the
value returned is false
- Attributes
Exceptions
if a database error happens.
Remarks
Retrieves the value of the designated column in the current row of this ResultSet
object as a boolean
in the Java programming language.
If the designated column has a datatype of CHAR or VARCHAR and contains a "0" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 0, a value of false
is returned. If the designated column has a datatype of CHAR or VARCHAR and contains a "1" or has a datatype of BIT, TINYINT, SMALLINT, INTEGER or BIGINT and contains a 1, a value of true
is returned.
Java documentation for java.sql.ResultSet.getBoolean(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.