Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Union and Field Mapping Differences.
Message
De
09/12/2003 11:21:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
SQL Union and Field Mapping Differences.
Divers
Thread ID:
00857243
Message ID:
00857243
Vues:
62
Hello everyone:

We have a local view that works fine in VFP7 but is creating a "view definition has changed" error on the first requery of the view. The view is defined with the NODATAONLOAD flag set True.

The view definition is based on a UNION of two select statements and the problem is occuring where we have a literal numeric placeholder for integer fields that exist on one side of the UNION that don't exist on the other ie.,
UNION ;
SELECT 0000 as TrpNum ...
where "TrpNum" is an integer column on the other side of the UNION. The problem is that when the view is initially opened with no data fetched, "TrpNum" (and other similar integer columns) are defined as Integer types in the cursor but when the view is subsequently requeried, the logic of the query establishes these columns as N(11,0).

Whilst I am aware of certain workarounds to resolve this issue, there appears to be a difference in VFP8's handling of this scenario because VFP7 took the differing data types "in its stride", reporting no such error.

Any thoughts on this difference? Other than using an integer column from a dummy table, is there any other "cleaner" way to express a placeholder literal as an integer type?

Many thanks.
-=Gary
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform