Following results to an array bound error at runtime, because of the existence of the field of type "G". Without it, it works as expected.
Problem is caused because DbCopyToArray() calls __BuildFieldList(), which ignores "G" type fields in the array it returns .
FUNCTION Start( ) AS VOID
LOCAL cDbf AS STRING
cDbf := "test"
? DbCreate(cDbf,{{"FLD","C",30,0},{"FLD2","N",10,0},{"FLD3","G",10,0}},"DBFVFP")
DbUseArea(TRUE,,cDbf)
DbAppend()
DbGoTop()
DIMENSION arr(5, 5) AS ARRAY
COPY TO ARRAY arr
ShowArray(arr)
Following results to an array bound error at runtime, because of the existence of the field of type "G". Without it, it works as expected.
Problem is caused because DbCopyToArray() calls __BuildFieldList(), which ignores "G" type fields in the array it returns .