Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Curious problem with _TALLY after an SQL Select
Message
De
25/08/2005 08:10:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Curious problem with _TALLY after an SQL Select
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01043776
Message ID:
01043776
Vues:
74
Curious problem I've never come across before. Consider the code below (an example as a very similar error occured in a similar piece):
Select *, RTE_NO + GEN + DIRECTN + STR( ESU_ID, 11) ;
  from mclMPSer!ROUTE_ESU ;
  where RTE_NO + GEN + DIRECTN + STR( ESU_ID, 11) not in ;
    (  Select Rte_No + Gen + Directn + STR( ESU_ID, 11) ;
  	from RouteESUMap) ;
  into Cursor csrNewRESUs NOFILTER 

lnRecCount  = _TALLY
If lnRecCount > 0					&& then new ROUTE_ESUs to copy over 
    Wait WINDOW "Updating GIS RouteESUMap table with new Route-ESUs from mPlan ..." NOWAIT NOCLEAR 
    Select csrNewRESUs 
    ...
When it gets to the line If lnRecCount > 0 it crashes with the old:

"operator/operand type mismatch" error.

So I halt it and inspect in debug. I find, of course, _TALLY is 0 or an integer (depending on which example), but lnRecCount is .F. How can this be when the previous line has equated lnRecCount with _Tally!!! ?

Now the first time it happened, I thought it a strange anomoly, and I equated the 2 values in the command window. Then I let the form run on, and the code below it worked OK, but it did exactly the same at the above code.

'ppreciate it

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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform