![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using UltraLite 9.0.2 and Visual Studio 2005 VB.NET. Is it more efficient to use the IFNULL SQL function or check for the Nothing value as shown below? Option A: Using cmd As New ULCommand("select ifnull(DESCRIPTION , '',DESCRIPTION) as DESCRIPTION from PARTS", _conn) cursor = cmd.ExecuteReader While cursor.MoveNext txtComment.Text = cursor.GetString(cursor.Schema.GetColumnID("DESCRI PTION")) Option B: Using cmd As New ULCommand("select DESCRIPTION from PARTS", _conn) cursor = cmd.ExecuteReader While cursor.MoveNext If Not cursor.GetString(cursor.Schema.GetColumnID("DESCRI PTION")) = Nothing Then txtComment.Text = cursor.GetString(cursor.Schema.GetColumnID("DESCRI PTION")) Else txtComment.Text = "" End If Thank you in advance. |
#3
| |||
| |||
|
|
I'm using UltraLite 9.0.2 and Visual Studio 2005 VB.NET. Is it more efficient to use the IFNULL SQL function or check for the Nothing value as shown below? Option A: Using cmd As New ULCommand("select ifnull(DESCRIPTION , '',DESCRIPTION) as DESCRIPTION from PARTS", _conn) cursor = cmd.ExecuteReader While cursor.MoveNext txtComment.Text = cursor.GetString(cursor.Schema.GetColumnID("DESCRI PTION")) Option B: Using cmd As New ULCommand("select DESCRIPTION from PARTS", _conn) cursor = cmd.ExecuteReader While cursor.MoveNext If Not cursor.GetString(cursor.Schema.GetColumnID("DESCRI PTION")) = Nothing Then txtComment.Text = cursor.GetString(cursor.Schema.GetColumnID("DESCRI PTION")) Else txtComment.Text = "" End If Thank you in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |