Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I use the field() command in a replace statement.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Can I use the field() command in a replace statement.
Divers
Thread ID:
00353285
Message ID:
00353285
Vues:
55
I am trying to write a generic import program where the user can select a table and specify a path and this program will read in the data.

I am getting an error with my replace command.
do while !feof(nFileHandle)
  select &cTable
  append blank
  for nCntr = 1 to fcount(cTable)
    do case
      case type(field(nCntr)) = "C"
	  replace eval(field(nCntr)) with alltrim(fgets(nFile))
      case type(field(nCntr)) = "N"
         replace field(nCntr) with val(fgets(nFile))
       .
       .
       .
      otherwise
    endcase
  endfor				
enddo
I've tried replace eval(field(nCntr)) with alltrim(fgets(nFile)) and replace field(ncntr) with alltrim(fgets(nFile))

But I keep getting the error: "Phrase contains unrecognized phrase/keyword"

Is there a way to do this?

Thanks,
Paul Acton
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform