From: "Sven" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Database stored procedure parameters
Date: Wed, 14 Apr 2010 16:41:17 +0000 (UTC)
Organization: University of Michigan
Lines: 16
Message-ID: <hq4r7d$20a$>
References: <hplco1$9j3$> <hpqebf$f0s$>
Reply-To: "Sven" <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1271263277 2058 (14 Apr 2010 16:41:17 GMT)
NNTP-Posting-Date: Wed, 14 Apr 2010 16:41:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: comp.soft-sys.matlab:626580

Thanks for the reply Yair. See below for some responses/questions.

> Re this specific case, your SP expects a VARCHAR2, which Matlab converts into an expectation for a Matlab string (char) object. Matlab's DB toolbox is not smart enough to understand that your java.lang.String object can easily be converted to a char using the char() function, so you should help it by char'ing yourself. 

OOPS! In various testing and boiling down my problem to newsgroup-ready code, I made a typo with the procedure definition.
It was supposed to be "(inClob IN CLOB, outChar OUT VARCHAR2)" rather than "(inClob IN VARCHAR2..."

My problem basically boils down to the fact that I don't actually *want* to pass my argument as a MATLAB char() or any other native MATLAB format. My choice of CLOB is due to the fact that the text I want to pass is very long (above the size limit for Oracle's VARCHAR2). The act of char'ing my java.lang.String object means that it gets passed as a VARCHAR2 to the stored procedure and I run over this limit. I will make another reply to this post that addresses this question directly with accompanying code.

> Re your general question about passing Java objects, I have never tried this but perhaps you can try passing them as a BLOB.

This is essentially what I'm trying to do. Can you give an example of MATLAB code that "passes arguments as a BLOB" (or in fact, *any* non MATLAB-native variable) to a stored procedure or an insert/update statement?