Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FPD26 commands being skipped over in Win XP
Message
De
15/05/2007 08:18:28
 
 
À
15/05/2007 07:53:38
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Versions des environnements
Visual FoxPro:
FoxPro Dos
OS:
Windows XP SP2
Divers
Thread ID:
01225453
Message ID:
01225472
Vues:
15
Thanks Tore and Ooops!

There are 3 slightly different versions to this prog that I had to amend. 2 of them go on to do some extra printing/fputting after the initial code shown below. It just so happens that I forgot to put in the FCLOSE() for this particular case (which I've now fixed, of course)
Do you think that would have had some bearing on the problem {sheepish grin}?

>No matter what delay you add, a delay after fclose() should be enough. I have seen cases where HD cache causes the kind of problems you describe. This is also one of the reason why the different flush() commands were later added.
>
>>I wish I could kill it, and the guy who wrote all the ramblings that I'm forced to maintain. Trouble is there are many clients (bus companies) who still use this system after some 10 years, and some of them STILL run it on an old, battered, grease-covered DOS PC!
>>
>>So will the inclusion of the INKEY() command, instead of, say a wee for-loop delay between each FPUTS(), definitely allow the FPUTS() commands to "catch up" and definitely do the writing before closing? As I said, I need to know why this is happening and get it right, or we lose this customer through lack of faith in us.
>>
>>Thanks for the input.
>>
>>>I'm sorry, but I killed FPD2.6 sometimes during the last millenium! <vbg> Anyway, my guess is that this is a timing issue, I suggest that you add a inkey(1,'HM') line after the fclose() line.
>>>
>>>>That's not really helpful, Tore.
>>>>
>>>>1. I've never used it
>>>>2. Help says that it "Provides evaluation of a character expression." which to my mind does not mean "write to a low-level file"
>>>>3. in FPD26 there is no Textmerge but there is Set Textmerge. Again, I've never used this. Pieces of text need to be delimited with / an // and I don't know that there is any advantage in this.
>>>>4. This still hasn't told me why the existing code doesn't work.
>>>>5. This system is being used at many clients and I'm loathe to create another version that will be different (then maybe I have to send it out all over again, by post, on floppies).
>>>>
>>>>
>>>>I've run it in native VFP mode, and in debug, and I've run the .exe on my m/c here and the output works in all cases.
>>>>>Why don't you use textmerge?
>>>>>
>>>>>>I have to maintain a 2.6 system. In the past it has been printing the results of a run to the printer. Recently many clients have got USB printer connections and the old system, of course, can't recognise one. Rather than altering each clien's computer set-up it was decided to print the report to a text file, which can be printed off at leisure.
>>>>>>
>>>>>>Trouble is, one (new) client says that the text file is created but that it's empty of any details. Now the file is written to, emulating the old version (where ? and ?? were used) thus:
>>>>>>
>>>>>>
>>>>>>If llTextFileOK
>>>>>>    = FPUTS( lnFileHdl, "Summary of application :"+alltrim(xdesc)+", included in file")
>>>>>>    = FPUTS( lnFileHdl, thisziph+" downloaded on "+dtoc(date()))
>>>>>>    ...
>>>>>>    = FPUTS( lnFileHdl, "")												
>>>>>>    = FPUTS( lnFileHdl, "********************************************")
>>>>>>    = FPUTS( lnFileHdl, "* The above application contains :         *")
>>>>>>    = FPUTS( lnFileHdl, "* Passenger records :"+str(tnumber,10,0) + "  :         *")
>>>>>>    = FPUTS( lnFileHdl, "* Total fare  :"+str(tfare,10,0)+" pence            *")
>>>>>>    ... etc
>>>>>>EndIf 	&& llTextFileOK	
>>>>>>
>>>>>>
>>>>>>Now in the past I've had to put delays into certain FP code because the computer was running too fast for the old code and was skipping certain commands, but I can't remember whether that was FPD26 code or VFP3. I haven't visited the client but I expect he has a fast new puter, as it has no floopy drive. Could this be a reason the FPUTS commands are not writing to the file, and that putting in wee delays will sort it?
>>>>>>
>>>>>>I need to get this right as it's a new client who's not been impressed at the failure of the system to report his output and I can't afford to send him a new system that equally doesn't work.
>>>>>>
>>>>>>'ppreciate it ASAP if you can :-)
>>>>>>
>>>>>>Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform