Skip to main content
Planview Customer Success Center

System error when using the API to update an entity

Symptoms

Error when trying to update a project using the ApiProject.Update() method of the Web Services API in a SOAP envelope.

Error in SQL trace from "exec UDF_SaveAll":

Error converting data type nvarchar to numeric.


Errors in COM API log:

Source: Changepoint.ChangepointAPI2.ApiLookup.executeNonQuery
Error: Number= -1 Message= Operation failed (system error).
StackTrace:
at Changepoint.CommonServices.DataAccess.DBAccess.ExecuteNonQuery()
at Changepoint.ChangepointAPI2.ApiLookup.executeNonQuery()

Source: Changepoint.ChangepointAPI2.ApiUDF.saveByXML
Error: Number= -1 Message= Operation failed (system error).
StackTrace:
at Changepoint.CommonServices.DataAccess.DBAccess.ExecuteNonQuery()
at Changepoint.ChangepointAPI2.ApiLookup.executeNonQuery()

Source: Changepoint.ChangepointAPI2.ApiUDF.Save
Error: Number= -1
StackTrace:
at Changepoint.ChangepointAPI2.ApiException.CopyError()
at Changepoint.ChangepointAPI2.ApiException.CopyError()
at Changepoint.ChangepointAPI2.ApiUDF.saveByXML()
at Changepoint.ChangepointAPI2.ApiUDF.Save()

Source: Changepoint.ChangepointAPI2.ApiProject.Update
Error: Project has been updated, but save UDF failed.
Error: Number= -1 Message= Operation failed (system error). 
Save UDF failed.
StackTrace:
at Changepoint.ChangepointAPI2.ApiException.SetError()
at Changepoint.ChangepointAPI2.ApiProject.Update()

Reason

The UDF string has invalid numeric values that have a comma (,) instead of a period (.) as the decimal separator.

Example:

<fielditem fieldname="ProjectText111" fieldformat="3">
<cptext name="Text111" caption="" value="6909,5" />
</fielditem>

Resolution

Change the decimal separators in the XML to periods (.)