Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: autoinc in cursors

$
0
0
Re: autoinc in cursors
FoxInCloud
Re: autoinc in cursors
Jun. 3, 2013
04:04 am
3ST08QD3IShow this entire thread in new window
Gratar Image based on email address
From:FoxInCloud support
To:Tuvia Vinitsky
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)
*


Viewing all articles
Browse latest Browse all 10393

Trending Articles