Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not Accepting .NULL.
Message
De
25/01/2001 07:34:04
 
 
À
25/01/2001 07:23:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00468365
Message ID:
00468370
Vues:
37
>>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 ?

How about the BLANK command ?
Len Speed
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform