Home > Back-end >  Questions about FieldValues is Null, try many methods are not, a great god opine
Questions about FieldValues is Null, try many methods are not, a great god opine

Time:10-12

I wrote a program using bcb6.0, adopt the way of generating BDF file to store the data, No the column using a c type, but sometimes will produce some empty value, cause error when search,

Form1 - & gt; FetalTable - & gt; The Last ().
If (Form1 - & gt; FetalTable - & gt; FieldValues [no]==NULL)
Form1 - & gt; FetalTable - & gt; The Delete ();

I try to use the above way, delete it, but if statement simply doesn't work,
In addition to direct comparison with NULL, also used with '\ 0' or directly with the if (Form1 - & gt; FetalTable - & gt; FieldValues [no]) are not,
Also used ISNULL () the function, but ISNULL compilation is not through, inside don't recognize the function,

Consult a great god: how can we determine whether it is empty ~ ~ ~ not only 88 figure a good color

CodePudding user response:

Already solved ~ ~ ~

CodePudding user response:

If (Form1 - & gt; FetalTable - & gt; FieldByName (" no ") - & gt; Value. The IsNull ())

CodePudding user response:

Table object FieldValues returns is a Variant type of data, with its IsNull method can determine whether it is NULL, such as:
If (Form1 - & gt; FetalTable - & gt; FieldValues [no] IsNull ())

CodePudding user response:

reference ccrun reply: 3/f
Table object FieldValues returns is a Variant type of data, with its IsNull method can determine whether it is NULL, such as:
If (Form1 - & gt; FetalTable - & gt; FieldValues [no] IsNull ())

CodePudding user response:

IsNull ()
  • Related