Platforms to show: All Mac Windows Linux Cross-Platform

DuckResultMBS.ColumnIndex(ColumnName as String) as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Looks up the column index.
Example:
Dim con As New DuckConnectionMBS // new in memory database

// make query with constant values
Dim result As DuckResultMBS = con.SQLSelect("SELECT 3 as Zahl")

// and show first one
MsgBox Str(result.ColumnIndex("Zahl")) // shows 0 for first column
Notes:
For best speed, please lookup column indexes once and cache it in a local variable.
Returns -1 if the column is not found with given name.
DuckResultMBS.ColumnName(Column as Integer) as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Returns the column name of the specified column.
DuckResultMBS.ColumnType(Column as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries column type for a cell.
Example:
Dim con As New DuckConnectionMBS // new in memory database

// make query with constant values
Dim result As DuckResultMBS = con.SQLSelect("SELECT 3, 4")

// and show first one
MsgBox Str(result.ColumnType(0)) // shows 4 for Int32
Notes: See Type* constants.
DuckResultMBS.ColumnValues(Column as Integer) as Variant()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries values for a whole column.
Notes: Same as looping and gathering values with Value() function.

Some examples using this method:

DuckResultMBS.Constructor private
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: The private constructor.
DuckResultMBS.Destructor
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: The destructor.
DuckResultMBS.IsNull(Column as Integer, Row as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Checks whether a cell is NULL.
DuckResultMBS.RowValues(Row as Integer) as Variant()
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries values for a whole row.
Notes: Same as looping and gathering values with Value() function.

Some examples using this method:

DuckResultMBS.Value(Column as Integer, Row as Integer) as Variant
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value for cell.
Notes: Depending on cell type, returns value as nil, boolean, Int32, Int64, Single, Double, or String.
DuckResultMBS.ValueBoolean(Column as Integer, Row as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as boolean.
Notes: Converts value if needed.
DuckResultMBS.ValueDate(Column as Integer, Row as Integer) as Date
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Function: Queries value as Date object.
Example:
Dim con As New DuckConnectionMBS // new in memory database

// make query with constant value as date using CAST function
Dim result As DuckResultMBS = con.SQLSelect("SELECT CAST('2012-05-20' AS date)")

// and show first one
Dim d As date = result.ValueDate(0,0)
MsgBox d.AbbreviatedDate
Notes:
Returns object on success and nil on failure.
Works for TypeDate and TypeTimestamp.

See also:

DuckResultMBS.ValueDate(Column as Integer, Row as Integer, byref Year as Integer, byref Month as Integer, byref Day as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as date.
Notes:
Returns true on success and false on failure.
Works for TypeDate and TypeTimestamp.

See also:

DuckResultMBS.ValueDateTime(Column as Integer, Row as Integer) as DateTime
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as DateTime object.
Notes:
Returns object on success and nil on failure.
Works for TypeDate and TypeTimestamp.
DuckResultMBS.ValueDouble(Column as Integer, Row as Integer) as Double
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as double.
Notes: Converts value if needed.
DuckResultMBS.ValueHugeInt(Column as Integer, Row as Integer, byref lower as UInt64, byref upper as Int64) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as huge int.
Notes:
For 128 bit integers.
Returns true on success and false on failure.
DuckResultMBS.ValueInt16(Column as Integer, Row as Integer) as Int16
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as Int16.
Notes: Converts value if needed.
DuckResultMBS.ValueInt32(Column as Integer, Row as Integer) as Int32
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as Int32.
Notes: Converts value if needed.
DuckResultMBS.ValueInt64(Column as Integer, Row as Integer) as Int64
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as Int64.
Notes: Converts value if needed.
DuckResultMBS.ValueInt8(Column as Integer, Row as Integer) as Int8
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as Int8.
Notes: Converts value if needed.
DuckResultMBS.ValueInterval(Column as Integer, Row as Integer, byref Months as Integer, byref Days as Integer, byref MilliSeconds as Int64) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as interval.
Notes: Returns true on success and false on failure.
DuckResultMBS.ValueSingle(Column as Integer, Row as Integer) as Single
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as Single.
Notes: Converts value if needed.
DuckResultMBS.ValueString(Column as Integer, Row as Integer) as String
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as string.
Example:
Dim con As New DuckConnectionMBS // new in memory database

// make query with constant values
Dim result As DuckResultMBS = con.SQLSelect("SELECT 3, 4")

// and show first one
MsgBox result.ValueString(0,0)
Notes: Converts value if needed.
DuckResultMBS.ValueTime(Column as Integer, Row as Integer, byref Hour as Integer, byref Minute as Integer, byref Second as Integer, byref MilliSeconds as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux iOS Targets
method DuckDB MBS DuckDB Plugin 21.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Function: Queries value as time.
Notes:
Returns true on success and false on failure.
Works for TypeTime and TypeTimestamp.

The items on this page are in the following plugins: MBS DuckDB Plugin.

Feedback: Report problem or ask question.

The biggest plugin in space...