Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dynamic SQL method 4 with array process

Re: Dynamic SQL method 4 with array process

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/02/28
Message-ID: <34fc70a1.17680443@192.86.155.100>#1/1

A copy of this was sent to dbnerd <dbnerd_at_erols.com> (if that email address didn't require changing) On Fri, 27 Feb 1998 21:46:09 -0500, you wrote:

>Hi,
>
>Hopefully someone can answer this question.
>
>When using PRO*C dynamic SQL method 4, the descriptor->V variable points
>to the address of the data buffer, descriptor->L points to the length of
>the data buffer. This works fine when processing single record at a
>time. How about if the host variable is an array? The data length for
>each array elements are different(null terminated string). There is
>only one variable to use(descriptor->L). If I specify descriptor->L
>equals to the element size, Oracle includes the null byte at the end of
>each string. I have to make sure all string array elements are padded
>with blanks and no null byte at the end. There must be a better way to
>implement this.
>
>Can someone help?
>
>Thanks.
>Bob

What are you setting the type (->T) to? I like to use type = 5, NULL terminated STRING type. In this way, the L field is used to specify the maximum length while the data itself is given in NULL terminated strings. Sounds like you are using the CHAR type as your bind variable which is a fixed length, blank padded string.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sat Feb 28 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US