Problem In Retrieving An Array Of Character Values

Results 1 to 2 of 2

Thread: Problem In Retrieving An Array Of Character Values

  1. #1
    Join Date
    Dec 1969

    Default Problem In Retrieving An Array Of Character Values

    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 &#039; a valid database connection<BR> cmdStoredProc.CommandText = "getmohan"<BR> cmdStoredProc.CommandType = 4 &#039;adCmdText<BR><BR> T = (&H2000 OR 129) &#039;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 &#039;800a0d5d&#039; <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.

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem In Retrieving An Array Of Character Va

    Are you getting the first value of the possible array or the last value ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts