Search found 745 matches: null

Return to advanced search

Re: How to write NULL to a Sql table

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 := ...
by nageswaragunupudi
Thu Apr 23, 2009 3:40 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

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 ...
by nageswaragunupudi
Thu Apr 23, 2009 3:10 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Sorry, I'm running out of ideas... :-(

EMG
by Enrico Maria Giordano
Wed Apr 22, 2009 8:45 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Enrico

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 :(

Rick
by Rick Lipkin
Wed Apr 22, 2009 8:18 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

It seems you are using an old version of win32ole.prg.

EMG
by Enrico Maria Giordano
Wed Apr 22, 2009 7:38 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Rao

YES ..

#xtranslate NULL => VTWrapper( 1, nil )

Was the answer !!

Thanks
Rick Lipkin
by Rick Lipkin
Wed Apr 22, 2009 7:11 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

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 ...
by nageswaragunupudi
Wed Apr 22, 2009 2:56 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Perhaps you should try with latest xHarbour from CVS.

EMG
by Enrico Maria Giordano
Tue Apr 21, 2009 7:58 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Enrico

Using FWH 811 and the xHarbour build 1.1.0 rev 6195 .. the database is MS Sql Server .. not any other sql flavor.

Rick Lipkin
by Rick Lipkin
Tue Apr 21, 2009 3:30 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Works fine here using latest xHarbour from CVS.

EMG
by Enrico Maria Giordano
Tue Apr 21, 2009 3:17 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

... = " ", , ) 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
by Rick Lipkin
Tue Apr 21, 2009 2:43 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

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 ...
by gkuhnert
Tue Apr 21, 2009 8:30 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

Rick Lipkin wrote:oRsFac:Fields("permnum"):Value := if(i->permnum = 0, '', i->permnum )


Try

Code: Select all  Expand view
oRsFac:Fields("permnum"):Value   := if(i->permnum = 0, , i->permnum )


EMG
by Enrico Maria Giordano
Tue Apr 21, 2009 7:58 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

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 ...
by Rick Lipkin
Tue Apr 21, 2009 3:05 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339

Re: How to write NULL to a Sql table

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 ...
by Armando
Tue Apr 21, 2009 2:32 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to write NULL to a Sql table
Replies: 36
Views: 6339
PreviousNext

Return to advanced search