>I build an cursor from a sql database and I would like to append it to a 6.0 table to report from. I do not want .NULL. to appear in my table. How can I go about checking the resulting cursor to convert any field types that have null to their respective empty, blank {//} field types. Here is what I have so far
>
>sele yada from sql table into table tone1
>
>sele tone1
>FOR gncount = 1 to Fcount() && get how many fields exist
> VAR1 = Type(field(fncount))
> DO CASE
> CASE VAR1 = "N"
> var2 = 0
> CASE VAR1 = "T"
> var2 = {//}
> CASE VAR1 = "L"
> var2 = .f.
> CASE VAR1 = "C"
> var2 = " "
> ENDCASE
>
> IIF(ISNULL(FIELD(GNCOUNT)),VAR2,FIELD(GNCOUNT))
>ENDFOR
>
>But when I try to appen tone1 to my 6.0 table, it tells me that one of the fields do not accept null values...apparently the code above doesn't work properly....what am i missing?
Anything to do with field(fncount) being used rather than field(gncount) in assignment to var1, or is that just a typo ?
Len Speed