on 11-14-2012 7:30 AM
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?
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.