Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing a Field Type
Message
De
24/09/2004 07:34:21
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00945673
Message ID:
00945680
Vues:
18
You can read directly a memo field into a string variable:
MyStr = MyTable.MyMemoField
To check if a given field is a memo type, you need to use AFIELDS:
lnFieldsCnt = AFIELDS (laFields, "MyTable")

FOR I = 1 TO lnFieldsCnt
   DO CASE
   CASE laFields [I, 2] == "C"   && Character
   CASE laFields [I, 2] == "D"   && Date
   CASE laFields [I, 2] == "L"   && Logical
   CASE laFields [I, 2] == "M"   && Memo
      MyStr = EVAL (laFields [I, 1])
   CASE laFields [I, 2] == "N"   && Numeric
   CASE laFields [I, 2] == "F"   && Float
   CASE laFields [I, 2] == "I"   && Integer
   CASE laFields [I, 2] == "B"   && Double
   CASE laFields [I, 2] == "Y"   && Currency
   CASE laFields [I, 2] == "T"   && DateTime
   CASE laFields [I, 2] == "G"   && General
   ENDCASE
ENDFOR
HTH

>How could I then convert a memo field into a string?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform