I create this code. When I try create browse object for database with field name like database error is generated (data width).
- Code: Select all Expand view RUN
Function TestDFN ()
Local oWnd := Nil
Local oLst := Nil
Local aStr := {}
Local i := 0
AAdd (aStr, {'TestDfn', 'C', 30, 0})
AAdd (aStr, {'F2', 'N', 5, 0})
DbCreate ('TestDfn', aStr)
Use TestDFN New
For i := 1 To 50
TestDFN->(DbAppend ())
TestDFN->TestDFN := 'Field:' + PadL (i, 2)
TestDFN->F2 := i
Next
TestDFN->(DbGoTop ())
Define Window oWnd Title 'Test DFN'
@ 20, 0 ListBox oLst ;
Alias TestDFN ;
Fields ;
TestDFN->TestDFN, ;
TransForm (TestDFN->F2, '99') ;
FieldSizes 100, 30 ;
Headers 'TestDFN', 'F2' ;
Size 240, 200 ;
Pixel
Activate Window oWnd
Return .T.
Regards
Pawel