Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Nonsense
Message
De
26/07/2008 11:32:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/07/2008 14:05:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01334124
Message ID:
01334238
Vues:
7
>Upon further investigation, I have discovered that the problem with SQL Select and arrays only occurs when using a function is the Select statement.
>
>Run the following code in VFP 9.0:
>
>SET ENGINEBEHAVIOR 90
>
>CREATE CURSOR test (ky i)
>SELECT MAX(ky) FROM test INTO ARRAY laTest
>
>debug
>SUSPEND
>
>Examine the contents of laTest in the Locals window. The result will be null. Now run this code:
>
>SET ENGINEBEHAVIOR 80
>
>CREATE CURSOR test (ky i)
>SELECT MAX(ky) FROM test INTO ARRAY laTest
>
>debug
>SUSPEND
>
>The array is not created.
>
>Now run the following:
>
>SET ENGINEBEHAVIOR 90
>
>CREATE CURSOR test (ky i)
>SELECT ky FROM test INTO ARRAY laTest
>
>debug
>SUSPEND
>
>The array is not created.

James,
It has nothing to do with arrays. The engine behavior has been changed in 9.0. You can find that in what's new section I think. Before VFP9 when no matching records exist max() was returning 0 records. In VFP9 however a single record is created with a .null. value.
It is not a bug but a correction of bug (or an effort to come closer to ANSI SQL).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform