Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The wrong parameters were passed to the converter. Help!
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00171556
Message ID:
00178011
Vues:
76
>Brenda,

>Did you ever find the solution to this problem and/or check the SET("UDFPARMS")? Someone else reported the same problem in the newsgroups.
df - Microsoft MVP, MCP df FoxPro website last update 09-Jan-99

No I did not directly find the answer, and my exactly recollection is gone. But there were severaly factors involved. One of the first peices of code in the converter is a CASE statement.


DO CASE
CASE PARAMETERS() = 0
*- new feature for selectively converting 3.0 SCX and VCX files
m.pFileType = C_SCREENTYPEPARM
m.pFileName = ""
m.pVersion = C_30VERS
CASE PARAMETERS() == 3 AND PROGRAM(0) = "CONVERT"
*- okay -- classic mode of calling convert.app
CASE TYPE("pProgCall") == 'L' AND pProgCall
*- is being called from another program -- need to trap index into PROGRAM()
LOCAL i
FOR i = 1 TO 128
IF PROGRAM() == PROGRAM(i)
giCallingProg = MAX(1,i - 1)
EXIT
ENDIF
NEXT
*- note: if this fails (i.e., can;t locate current program in the PROGRAM()
*- array, giCallingProg will remain at 0 (MASTER)
OTHERWISE
*- called with wrong parameters
=MESSAGEBOX(E_BADCALL_LOC)
RETURN gReturnVal
ENDCASE

First, when I did a "modi report" from the Command Window it always worked correctly. It was when I did a "modi report" in code. In code, "modi report", did not pass the 4th parameter: pProgCall, a logical; and because it was called from within an object, PROGRAM(0) <> "CONVERT". It executed the otherwise. I tried commenting out the CASE statment, and again doing the code "modi report". I did not get an error (obviously), and it did create the backup .f2t and f2x files, but I never got the gauge (which shows the status of the conversion), and when I "modi report" from the command window it converted it again. So it did not really convert the report.

I ended up creating a 1 time conversion program that directly called the converted from my procs.prg (no objects). I used my custom converter that had the CASE statement commented out (believe I still could not get it correct with the CASE statement). The call was

do 'convvfp.exe' with afrxfiles(nCount,1),"REPORT","FOX",.T.

Brenda
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform