<i><b>Originally posted by : mpalaniswamy</b></i><br />I am trying to return an array of char values from oracle (8.1.7) stored procedure to ASP. My procedure follows:<br /><br />create or replace type char_varray is varray(200) of char(15);<br />/<br /><br />create or replace procedure getmohan(username out nocopy char_varray) is<br /> cursor mohan_cursor is<br /> select username from mohan;<br /><br /> percount number default 1;<br />begin<br /> username := char_varray();<br /> for mohan_record in mohan_cursor loop<br /> username.extend;<br /> username(percount) := mohan_record.username;<br /> percount := percount + 1;<br /> end loop;<br />end;<br />/<br /><br />I am able to get the array of values in SQL*Plus, but, NOT in ASP. The ASP code I use:<br /><br /> Set cmdStoredProc = Server.CreateObject("ADODB.Command")<br /> Set cmdStoredProc.ActiveConnection = Conn ' a valid database connection<br /> cmdStoredProc.CommandText = "getmohan"<br /> cmdStoredProc.CommandType = 4 'adCmdText<br /><br /> T = (&H2000 OR 129) 'adArray or adChar<br /> set param = cmdStoredProc.createparameter("username", T, 2, 2000, "")<br /> cmdStoredProc.parameters.append param<br /><br /> cmdStoredProc.Execute<br /><br />When I load this page, I am getting the following error:<br /><br />ADODB.Command error '800a0d5d' <br /><br />Application uses a value of the wrong type for the current operation. <br /><br />I am able to retrieve one single char value. NOT an array of char values. I use ADO 2.7.<br /><br />Any help would be greatly appreciated.<br /><br />Thanks.
