cancel
Showing results for 
Search instead for 
Did you mean: 

DI Server Error, please help.

Former Member
0 Kudos

I'm developing a class to use di server methods, when using AddObject the new Object is created but the response says that "i can't duplicate the primary key".

Example:

I send this

[OCRD] , '1). [ODBC SQL Server Driver][SQL Server]Infracción de la restricción PRIMARY KEY 'OCRD_PRIMARY'. No se puede insertar una clave duplicada en el objeto 'OCRD'...

I think is all right but...

That's not all same with RemoveObject, the object is removed but the response says "No record founds".

What's the matter with this??

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Are you sure that the object is really created? I guess that it maybe is not created, because you had an old object with the same code (222), and you mistakenly think the old object is the new object. Or am I wrong?

Former Member
0 Kudos

Hehe, you're wrong, i'm using a demo database with a few data, i've checked it in SAP and SQL Server... I don't mind very much that RemovedObject response was "No Record Founds" (the object is removed) but the adding is a problem, I can't check if it's correct or the object was really there before with that response. I thought that it was a kind of bug in the data manipulation methods.

This is the version of DI Server: 6.80.123.0 (I think)

Former Member
0 Kudos

Have you got any code on the transaction notification stored procedure?

Saludos,

Ibai Peñ

Former Member
0 Kudos

I don't understand, do you talk about the values in the soap response?

<?xml version="1.0"?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<env:Body>

<env:Fault>

<env:Code>

<env:Value>

env:Receiver

</env:Value>

<env:Subcode>

<env:Value>-1</env:Value>

</env:Subcode>

</env:Code>

<env:Reason><env:Text xml:lang="en">[OCRD] , '1). [ODBC SQL Server Driver][SQL Server]Infracción de la restricción PRIMARY KEY 'OCRD_PRIMARY'. No se puede insertar una clave duplicada en el objeto 'OCRD'.

2). [ODBC SQL Server Driver][SQL Server]Se terminó la instrucción.'

Former Member
0 Kudos

LOL There was an inspection sending-reciving first so when sending the object was created yet and the response faults.

(Looking the log file)