A problem TDatabase and xBrowse using < edit_get >
Posted: Sun Nov 17, 2019 12:56 pm
Hello,
I noticed a problem saving values with xBrowse edit_get
using
Browser 1
oCustomer := TDatabase():Open( , c_Path + "Customer", "DBFCDX", .T. )
only field LAST is working with some extracode
the same using
Browser 2
USE customer NEW SHARED ALIAS CUST VIA 'DBFCDX'
edit_get is working
2 testbrowser
@ 20,10 XBROWSE oBrw1 ;
COLUMNS "Id", 'First' , 'Last', 'Street', 'City' OF oDlg ;
SIZE -10,-160 PIXEL ;
COLSIZES "50, 120, 120, 110, 110" ;
DATASOURCE oCustomer
@ 130,10 XBROWSE oBrw2 ;
COLUMNS "Id", 'First' , 'Last', 'Street', 'City' OF oDlg ;
SIZE -10,-50 PIXEL ;
COLSIZES "50, 120, 120, 110, 110" ;
ALIAS 'CUST'
where does the difference comes from
regards
Uwe
I noticed a problem saving values with xBrowse edit_get
using
Browser 1
oCustomer := TDatabase():Open( , c_Path + "Customer", "DBFCDX", .T. )
only field LAST is working with some extracode
the same using
Browser 2
USE customer NEW SHARED ALIAS CUST VIA 'DBFCDX'
edit_get is working
Code: Select all
WITH OBJECT oBrw1:First
:nEditType = EDIT_GET
END
WITH OBJECT oBrw1:Last
:nEditType = EDIT_GET
:bOnPostEdit := {|o, v, n| IIF( n != VK_ESCAPE, ;
oCustomer:FieldPut( 3, v ), ), ; // Field no 3 defined for saving !!!
oCustomer:Save(), oBrw1:RefreshCurrent() }
END
WITH OBJECT oBrw1:Street
:nEditType = EDIT_GET
END
@ 20,10 XBROWSE oBrw1 ;
COLUMNS "Id", 'First' , 'Last', 'Street', 'City' OF oDlg ;
SIZE -10,-160 PIXEL ;
COLSIZES "50, 120, 120, 110, 110" ;
DATASOURCE oCustomer
@ 130,10 XBROWSE oBrw2 ;
COLUMNS "Id", 'First' , 'Last', 'Street', 'City' OF oDlg ;
SIZE -10,-50 PIXEL ;
COLSIZES "50, 120, 120, 110, 110" ;
ALIAS 'CUST'
where does the difference comes from
regards
Uwe