Created a view in View designer. Generated a prg using GenDbc to get the view code and modified the prg. Deleted the view from the DBC and recreated it thru' this prg.
Created a form with the view in the DE, a grid using this view and buttons to add & delete records.
In Form Init:
Set multilock on
=CURSORSETPROP("Buffering",5)
I can traverse the grid without an error. Only, when I make a change and trigger a requery on the view, i get this error:
Table buffer for alias "vnatgn" contains uncommitted changes.
Could someone please advise me on where I'm going wrong?
TIA and Regards,
Rajesh
The generated + modified view prg:
* VNation.Prg
************************
*!* CREWQUOT.DBC is open
*!* SET EXCLUSIVE ON
CREATE SQL VIEW "VNATGN" AS SELECT Nation.ctrycode,Natgnpay.rankcat,Natgnpay.paycode, Natgnpay.value, Natgnpay.ctrycode ;
FROM crewquot!nation INNER JOIN crewquot!natgnpay ;
ON Nation.ctrycode = Natgnpay.ctrycode ;
ORDER BY Natgnpay.ctrycode,Natgnpay.rankcat,Natgnpay.paycode
DBSETPROP('VNATGN', 'View', 'Tables', 'Natgnpay')
DBSetProp('VNATGN.rankcat', 'Field', 'UpdateName', 'crewquot!natgnpay.rankcat')
DBSetProp('VNATGN.paycode', 'Field', 'UpdateName', 'crewquot!natgnpay.paycode')
DBSetProp('VNATGN.value', 'Field', 'UpdateName', 'crewquot!natgnpay.value')
DBSetProp('VNATGN.ctrycode_b', 'Field', 'UpdateName', 'crewquot!natgnpay.ctrycode')
DBSetProp('VNATGN.ctrycode_a', 'Field', 'KeyField', .T.)
DBSetProp('VNATGN.ctrycode_a', 'Field', 'Updatable', .F.)
DBSetProp('VNATGN.ctrycode_a', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN.rankcat', 'Field', 'KeyField', .F.)
DBSetProp('VNATGN.rankcat', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.rankcat', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN.paycode', 'Field', 'KeyField', .F.)
DBSetProp('VNATGN.paycode', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.paycode', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN.value', 'Field', 'KeyField', .F.)
DBSetProp('VNATGN.value', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.value', 'Field', 'DataType', "F(10,2)"
DBSetProp('VNATGN.ctrycode_b', 'Field', 'KeyField', .T.)
DBSetProp('VNATGN.ctrycode_b', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.ctrycode_b', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN', 'View', 'UpdateType', 1)
DBSetProp('VNATGN', 'View', 'SendUpdates', .T.)
Created a form with the view in the DE, a grid using this view and buttons to add & delete records.
In Form Init:
Set multilock on
=CURSORSETPROP("Buffering",5)
I can traverse the grid without an error. Only, when I make a change and trigger a requery on the view, i get this error:
Table buffer for alias "vnatgn" contains uncommitted changes.
Could someone please advise me on where I'm going wrong?
TIA and Regards,
Rajesh
The generated + modified view prg:
* VNation.Prg
************************
*!* CREWQUOT.DBC is open
*!* SET EXCLUSIVE ON
CREATE SQL VIEW "VNATGN" AS SELECT Nation.ctrycode,Natgnpay.rankcat,Natgnpay.paycode, Natgnpay.value, Natgnpay.ctrycode ;
FROM crewquot!nation INNER JOIN crewquot!natgnpay ;
ON Nation.ctrycode = Natgnpay.ctrycode ;
ORDER BY Natgnpay.ctrycode,Natgnpay.rankcat,Natgnpay.paycode
DBSETPROP('VNATGN', 'View', 'Tables', 'Natgnpay')
DBSetProp('VNATGN.rankcat', 'Field', 'UpdateName', 'crewquot!natgnpay.rankcat')
DBSetProp('VNATGN.paycode', 'Field', 'UpdateName', 'crewquot!natgnpay.paycode')
DBSetProp('VNATGN.value', 'Field', 'UpdateName', 'crewquot!natgnpay.value')
DBSetProp('VNATGN.ctrycode_b', 'Field', 'UpdateName', 'crewquot!natgnpay.ctrycode')
DBSetProp('VNATGN.ctrycode_a', 'Field', 'KeyField', .T.)
DBSetProp('VNATGN.ctrycode_a', 'Field', 'Updatable', .F.)
DBSetProp('VNATGN.ctrycode_a', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN.rankcat', 'Field', 'KeyField', .F.)
DBSetProp('VNATGN.rankcat', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.rankcat', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN.paycode', 'Field', 'KeyField', .F.)
DBSetProp('VNATGN.paycode', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.paycode', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN.value', 'Field', 'KeyField', .F.)
DBSetProp('VNATGN.value', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.value', 'Field', 'DataType', "F(10,2)"
DBSetProp('VNATGN.ctrycode_b', 'Field', 'KeyField', .T.)
DBSetProp('VNATGN.ctrycode_b', 'Field', 'Updatable', .T.)
DBSetProp('VNATGN.ctrycode_b', 'Field', 'DataType', "C(10)"
DBSetProp('VNATGN', 'View', 'UpdateType', 1)
DBSetProp('VNATGN', 'View', 'SendUpdates', .T.)