Rick Lipkin wrote:Rao
YES ..
#xtranslate NULL => VTWrapper( 1, nil )
Was the answer !!
Thanks
Rick Lipkin
I have checked with the latest win32ole.prg. There is no change. If we try to assign nil, where NULL is to be assigned to a parameter, Oracle complains as wrong data type. When NULL is read it is returned as NIL but when NIL is written, it is not passed on as NULL, the way acceptable by Oracle/MSSql.
Interstingly Empty dates ( CToD('') ) are passed on as NULLs successfully, but not NIL as NULL.
relevant portions of source from win32ole.prg
- Code: Select all Expand view
case HB_IT_NIL:
//pVariant->n1.n2.vt = VT_EMPTY;
break;
.......
case HB_IT_DATE:
if( pItem->item.asDate.value == 0 )
{
pVariant->n1.n2.vt = VT_NULL;
}
Probably replacing "//pVariant->n1.n2.vt = VT_EMPTY;" with "pVariant->n1.n2.vt = VT_NULL;" may give the desired results.
Instead of tinkering with the source code of win32ole.prg, I found out the above work around of using VTWrapper( 1, nil ).
Wish xHarbour changes the win32ole.prg suitably.
I have not tried with Harbour.