Hi all,
I have new record inserted in a SqlLite table.
Most of this fields are empty/null.
I have the same routine to read new and existent records
I try to read the fields in a loop to check if assign to a variables:
but the Null check return :Error evaluating expression.
I tried many solution without success.
I read some post that suggest to insert a clause if in the SELECT:
but is seem a bit complex, moreover I have field name not 'hardcoded' etc.
Some other suggestions to check the Null value in a field?
Thanks in advance
Paolo
I have new record inserted in a SqlLite table.
Most of this fields are empty/null.
I have the same routine to read new and existent records
I try to read the fields in a loop to check if assign to a variables:
B4X:
Dim DbField as string="Field1"
If curor.GetString(DbField)<>Null Then
textbox.Text=cur.GetString(DbField)
Else
textbox.Text=""
End If
but the Null check return :Error evaluating expression.
I tried many solution without success.
B4X:
Dim obj As Object=cur.GetString(campodb)
If obj<>Null Then
I read some post that suggest to insert a clause if in the SELECT:
B4X:
SELECT ifnull(col1, "") as Field1 ......
but is seem a bit complex, moreover I have field name not 'hardcoded' etc.
Some other suggestions to check the Null value in a field?
Thanks in advance
Paolo