↧
Re: autoinc in cursors
↧
From: | Tuvia Vinitsky |
To: | FoxInCloud support |
CURSORGETPROP('AutoIncError') Contains True (.T.) when attempts to insert or update a value in a field that uses automatically incrementing field values generate an error message. Contains False (.F.) when attempts to insert or update a value in a field that uses automatically incrementing field values
does not generate an error message and the specified value to be inserted or updated is disregarded. Applies to cursors and sessions.
I think we'd better use
laField[m.liField, 18] = 0 && If the fields in the table use autoincrementing, the Step value is greater than 0
In order to make autoinc fields work in awserver.PropsRestore_DS_Alias_cXMLcursor you need to adjust the code as shown here:
* TBV
* This XMLTCURSOR will aways fail because the autoinc field throws a read-only error message.
* The VFP docs say the only way around that is to set autoincerror off.
LOCAL lcAINStat
lcAINStat = CURSORGETPROP("AutoIncError",m.lcResult)
=CURSORSETPROP("AutoIncError", "off", m.lcResult)
*