0
My xml may be wrong, of course. but since I’m not sure, I say: I need to pass a parameter via programming to a proc. As in my program is coming null, I decided to run directly manually first in pl/sql and still nothing came. The xml mounted by the system comes like this:
[0]: {<sCodPrestadorTs>1366348</sCodPrestadorTs>
}
[1]: {<sCodPrestadorTsSub>3850055</sCodPrestadorTsSub>
}
[2]: {<sCodRede>801</sCodRede>
}
[3]: {<sCodOperadora>1</sCodOperadora>
}
[4]: {<sDataExclusao>07/01/2016</sDataExclusao>
}
To pass the hand, I did so:
<sCodPrestadorTs>1366348</sCodPrestadorTs>
<sCodPrestadorTsSub>3850055</sCodPrestadorTsSub>
<sCodRede>801</sCodRede>
<sCodOperadora>1</sCodOperadora>
<sDataExclusao>07/01/2016</sDataExclusao>
And so I pass the proc straight. The type passed to string, as seen in the image.
What is wrong with this approach? I used the c#tag, because the application where the parameter is passed is in c#(web Forms).
One of the errors is that there was no parent tag. I put and managed to run proc and return something. It was like this xml:
<parametros>
<sCodPrestadorTs>1366348</sCodPrestadorTs>
<sCodPrestadorTsSub>3850055</sCodPrestadorTsSub>
<sCodRede>801</sCodRede>
<sCodOperadora>1</sCodOperadora>
<sDataExclusao>07/01/2016</sDataExclusao>
</parametros>
It’s hard to know why you’re returning
null
, may be problem in the process. However I highly recommend that when working withXML
in an Oracle database use theXMLTYPE
instead of aSTRING
. If I can put in the proc code, it might be easier to help you.– Lucas Fontes Gaspareto
I discovered some things and I’ve solved the null issue.
1) deveria ter uma tag pai e não tinha 2) Eu estava passando um valor errado, em verdade estava errado, pois estavam fazendo manu no BD e esse BD de Dev. é usado por RJ e SP.
These were the null problems, but it’s not solved yet. It doesn’t work from the application, only local in the BD.– pnet