Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 7 to VFP 9.02
Message
De
18/01/2012 17:31:53
 
 
À
18/01/2012 16:59:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01533101
Message ID:
01533252
Vues:
54
>>>>Quick question, I have got to move a VFP 7 app to VFP 9.02.
>>>>
>>>>Any thing I should be aware of in this process? I assume when I open the VFP 7 project in VFP 9 that it will do some kind of conversion.
>>>>
>>>>Thanks in advance for any thoughts.
>>>As Naomi said, make sure you check the "SET ENGINEBEHAVIOR " in the help or put in a line of code setting the engine behavior to 70 to get your SQL to work the same as it does in VFP 7.0.
>>
>>That's not really a good advice. The best solution is to ONLY change this setting to 70 until you have fixed all the wrong select statements. If you don't fix the select statements, you may end up with wrong data. The default is 90, and it should always be that.
>
> I agree that setting the engine behavior to 70 may not be the best solution but the SQL would provide exactly the same results it does now. I would also assume that if the app was written in 7.0 that someone would realize by now that they were getting the wrong data from the SQL.

Some selects statements with "old and wrong" syntax produced, repeatedly and cinsistently, wrong data in VFP7, and also in VFP8. The only fix to this was to enforce more strict ANSI compliance, with the result that some old select statements produced errors. As a "band aid" Microsoft introduced the Set Enginebehavior setting, which made it easier to fix the select statements one by one, instead of having a lot of error messages. However, leaving the setting at 70 or 80 may or may not produce wrong data, depending on several factors.

From http://msdn.microsoft.com/en-us/library/ax9aye37(v=VS.80).aspx:
When you set SET ENGINEBEHAVIOR to 70 or 80 and the code page of the table (CPDBF( )) differs from the current Visual FoxPro code page setting (CPCURRENT( )), SQL or other Rushmore optimizable commands could return or act upon incorrect records. When you set SET ENGINEBEHAVIOR to 90, Visual FoxPro builds temporary indexes to ensure correct results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform