TD5.1 SqlPLSQLCommand gets error using string arrays

General discussion forum about all databases other than SqlBase.
NadineRoos

TD5.1 SqlPLSQLCommand gets error using string arrays

Post by NadineRoos » 06 Dec 2007, 18:06

Using string arrays as IN parameter with function SqlPLSQLCommand in TD5.1 following error occurs:

ORA-01480: trailing null missing from STR bind value

Our workaround is to add the NULL-Terminator at the end of each array-element:
!!CB!! 227
Set nLength = SalStrLength( asNames[ nCount ] )
Call SalStrSetBufferLength( asNames[ nCount ], nLength + 2 )
Call CStructPutWord( asNames[ nCount ], nLength * 2, 0 )




But it is impossible to change it at all places we use string arrays. A fix would be desirable.
Last edited by NadineRoos on 11 Dec 2007, 17:07, edited 1 time in total.

Jean-Marc Gemperle

Re: TD5.1 SqlPLSQLCommand gets error using string arrays

Post by Jean-Marc Gemperle » 06 Dec 2007, 18:47

Hi,

I will check that issue and let you know. If you have something handy that I can directly test let me know.

I might be totaly wrong : I understand your workaround fine, but not sure why when you call

Call SalStrSetBufferLength( asNames[ nCount ], nLength + 2 )

nLenth is not * 2. SalStrLengthis the number of chars and not the size of the buffer in bytes, thus I'm affraid you reset the size of your buffer to the half...why not using SalStrGetBufferLength instead.
Maybe it is a typo ? or I don't get something which is possible:-) if that is the case sorry

Cheers
Jean-Marc

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 3 guests