Help me please. Use PowerBuilder 11.5.1.
I have Oracle stored procedure
message ( out_error OUT INTEGER, client_absid IN INTEGER, document_subject IN VARCHAR, document_text IN VARCHAR, document_attachedfiles IN FILEINF_T, p_client_abs IN VARCHAR ) FILEINF_T AS OBJECT ( attachedfiles_name VARCHAR(255) , attachedfiles_val BLOB )
I use local external function for call it
SUBROUTINE message ( ref long out_error, long client_absid, string document_subject,string document_text, readonly fileinf_t document_attachedfiles[], string client_abs) RPCFUNC ALIAS FOR "message"
Structure in PB:
global type fileinf_t from structure string attachedfiles_name blob attachedfiles_val end type
In script:
FILEINF_T files[] FILEINF_T file file.attachedfiles_name = "test" files[1] = file .... this.message ( ref ll_return, pclient_absid, pdocument_subject, pdocument_text, files, pclient_abs)
I give error "Unsupported argument type in DLL function message at line 23 in function uf_ib_messagefile of object ub_ib6_transaction."
Why?
Hi Sergey;
FWIW: Looks like you needed to declare your first element in the structure as an array ... attachedfiles_name [] - OR - remove the array statement from the RPC definition (readonly fileinf_t document_attachedfiles[]) to make them consistent.
HTH
Regards ... Chris
Thanks for the reply.
I tried to add [] to the first element structure, removed [ ] from the RPC definition, but error is.
PB doesn't support Oracle object types, so you're going to have to change the method itself ( or wrap it with another stored procedure) so that the arguments looks more like:
Of course, PB has somewhat limited support for the blob as well.
I don't see any reference to an array of anything in the method though, why were you trying to pass an array?
Thanks for your answer.
Developers comment that it list files.
Are you sure you have the code snippet correct then? If it's an array, then it would more like:
If that is the case, you still have a problem. Oracle doesn't support passing record types, much less arrays of record types. Once again, you'd need to look at creating another function that handles procedures with arguments that PB does support.
Did this resolve your question?
If so, can you mark the question answered and indicate which responses you found helpful and/or correct.
If not, could you let us know what you still have questions about?