WinJS OData JSON

Versuchen Sie, Daten per Webdienst an meine Datenbank zu senden, und erhalten Sie den folgenden Fehler:

Primitive values of type 'Edm.Decimal' and 'Edm.Int64' must be quoted in the payload. Make sure the value is quoted

Hier ist mein Code:

var newEntry = {
        datum: entryDate,
        monat: parseFloat(entryMonth),
        taetigkeit: document.getElementById("addWork").value,
        total: parseFloat(document.getElementById("addTotal").value),
        totalV: parseFloat(document.getElementById("addTotalV").value),
        in_auswertung: 0,
        teil_projekt_id: parseFloat(document.getElementById("addSubProject").value),
        projekt_id: parseFloat(document.getElementById("addProject").value),
        TimeStamp: entryDate,
        sAuftraggeber: document.getElementById("addContractor").value,
        iidBenutzer: parseFloat(298),//sessionStorage.getItem("userId"),
        akt_id: parseFloat(document.getElementById("addActivity").value)
    };

    WinJS.xhr({
        type: "post",
        url: requestUrl,
        data: JSON.stringify(newEntry),
        headers: {
            "Content-type": "application/json"
        }

    }).then(
          function complete(response) {

          },

Vielen Dank, Marlowe

Antworten auf die Frage(1)

Ihre Antwort auf die Frage