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.
TD5.1 SqlPLSQLCommand gets error using string arrays
TD5.1 SqlPLSQLCommand gets error using string arrays
Last edited by NadineRoos on 11 Dec 2007, 17:07, edited 1 time in total.
Re: TD5.1 SqlPLSQLCommand gets error using string arrays
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
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
Who is online
Users browsing this forum: [Ccbot] and 0 guests