Ooops,
after the C0..5 my pjx is gone (Error 1685)
Agnes
>I stumbled upon an unexpected problem found in both VFP 8 SP1 and 9 SP1.
>
>Background: I added additional lines to our original EXECSCRIPT() parameter and, from the command window, the changes ran fine. (This EXECSCRIPT() parameter string is legal.)
>
>However, whenever I attempted to compile the project it quickly crashed with the dreaded C000005 error. The identical behavior occurs on my manager's machine. Changing the FOXUSER resource file, my first guess, makes no difference.
>
>A workaround is to add the parameter value indirectly via a variable. Is this a bug or is this behavior documented? Simple repro code follows:
>
>#IF ( .T. )
> * This builds just fine
> lcOnF3Script = ;
> "local lcTagName" + chr(13) + chr(10) + ;
> "local lnTagHit" + chr(13) + chr(10) + ;
> "gcHowExited='F3'" + chr(13) + chr(10) + ;
> "select 'AltProvFacil'" + chr(13) + chr(10) + ;
> "ATagInfo(laTheTags,'AltProvFacil')" + chr(13) + chr(10) + ;
> "lnTagHit = ascan( laTheTags, 'SSN', -1, -1, 1, 15 )" + chr(13) + chr(10) + ;
> "if ( empty( m.lnTagHit ) )" + chr(13) + chr(10) + ;
> " lnTagHit=ascan( laTheTags, 'TIN', -1, -1, 1, 15 )"+ chr(13) + chr(10) + ;
> "endif" + chr(13) + chr(10) + ;
> "lcTagName=laTheTags[ m.lnTagHit, 1 ]" + chr(13) + chr(10) + ;
> "lcTagName=iif(order()=='DISPLORDER', m.lcTagName, 'DisplOrder' )" ;
> + chr(13) + chr(10) + ;
> "set order to (m.lcTagName)" + chr(13) + chr(10) + ;
> "KEYBOARD '{Esc}' plain"
> * Inserting the parameter text using a varialble
> on key label "F3" execscript( m.lcOnF3Script )
>#ELSE
> * This crashes a build under both VFP 8 SP1 and VFP 9 SP1
> *
> * Inserting the same text directly causes a C0000005 error when
> * the project is built and yields no clue as to the cause!
> *
> * (Note: In a .PRG run from the command line the following
> * will run without problem -- until a build is attempted.)
> *
> on key label "F3" execscript( ;
> "local lcTagName" + chr(13) + chr(10) + ;
> "local lnTagHit" + chr(13) + chr(10) + ;
> "gcHowExited='F3'" + chr(13) + chr(10) + ;
> "select 'AltProvFacil'" + chr(13) + chr(10) + ;
> "ATagInfo(laTheTags,'AltProvFacil')" + chr(13) + chr(10) + ;
> "lnTagHit = ascan( laTheTags, 'SSN', -1, -1, 1, 15 )" + chr(13) + chr(10) + ;
> "if ( empty( m.lnTagHit ) )" + chr(13) + chr(10) + ;
> "lnTagHit=ascan( laTheTags, 'TIN', -1, -1, 1, 15 )" + chr(13) + chr(10) + ;
> "endif" + chr(13) + chr(10) + ;
> "lcTagName=laTheTags[ m.lnTagHit, 1 ]" + chr(13) + chr(10) + ;
> "lcTagName=iif(order()=='DISPLORDER', m.lcTagName, 'DisplOrder' )" ;
> + chr(13) + chr(10) + ;
> "set order to (m.lcTagName)" + chr(13) + chr(10) + ;
> "KEYBOARD '{Esc}' plain" )
>#ENDIF
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]