Ideally we would like to read NULL as NIL and write NIL as NULL. If win32ole.prg can do this, our code becomes far simpler, neat and uncluttered with many if(... ) statements. For example, instead of writing oCmd:Parameters( n ):Value := ...
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 ...
Using the official binaries from FTDN for xHarbour 409 .. not linking in anything else .. and it appears the FTDN version has a newer build revision than xHarbour.org
The solution I found long time back and working for me for assigning NULL to fields or parameter values. #xtranslate NULL => VTWrapper( 1, nil ) ......// usage:oRs:Fields(n):Value := NULLoCmd:Parameters( n ):Value := NULL I have ...
... = " ", , ) oRsRel:Fields("qualified_ind"):Value := if(i->qualify = " ", nil ,nil ) Both expressions should return NULL and what happends in MS Sql server the field is just appends blank spaces .. Rick Lipkin
Rick, as SQL Statement you could write something like UPDATE fac SET permnum = null WHERE permnum = 0 On the recordset it might then look like: oRsFac:Fields("permnum"):Value := if(i->permnum = 0, nil, i->permnum ) oroRsFac:Fields("permnum"):Value ...
To All YES .. all the fields are marked to accept 'null' .. for some reason on SQL Server the in line if() does not seem to want to accept '' as null ( for me ) .. I have in the mean time used a regular if statement and only append a field if it is ...
Rick: With this sample I have no problem LOCAL nValor := 10.50// The field "UNI_USU" is VARCHAR(10) NOT NULL TypeoRsUni:Fields("UNI_USU"):Value := IIF(nValor = 0.00,'',nValor)oRsUni:UpDate() Neither with this an other example I have ...