Hi Jimmy,
I found SET NULLVALUE, I am testing also ON OFF, but no effect.
Only when I add NULL parameter to structure in Visual Foxpro and then when I add NIL value to field , then can test ISNULL()
But I do not know how add NUL parameter to DBF structure from Xbase++
this do not work not accept parameter nullable, however this is in Xbase++ manual in example for function
Code: Select all
aStruct:=DbStruct()
aadd(aStruct,{'TYP_ZM','N',2,0,"nullable"})
lupdstru:=DC_STRUUPDATE(aStruct,,,,.F.)
but this do not work not accept parameter nullable, however this is in Xbase++ manual in example for function :
// The sample illustrates how DbSetNullValue()
// affects the Null value representation of a
// field which is nullable.
PROCEDURE Main()
LOCAL aStructure := {}
AAdd( aStructure , { "LASTNAME" , "C" , 20 , 0 } )
AAdd( aStructure , { "REVENUE" , "N" , 8 , 2 , "nullable" } )
AAdd( aStructure , { "CONTACT" , "D" , 8 , 0 , "nullable" } )
DbCreate("Customer",aStructure,"FOXCDX")
USE Customer EXCLUSIVE VIA FOXCDX
DbAppend()
FIELD->LASTNAME := "Joe Doe"
// result: "Joe Doe 0 . . "
//
DbSetNullValue(.F.)
? FIELD->LASTNAME, FIELD->REVENUE, FIELD->CONTACT
// result: "Joe Doe NIL NIL"
//
DbSetNullValue(.T.)
? FIELD->LASTNAME, FIELD->REVENUE, FIELD->CONTACT