Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ORACLE AND SQLEXEC() Part III
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
ORACLE AND SQLEXEC() Part III
Divers
Thread ID:
00002230
Message ID:
00002230
Vues:
73
If you run this parameterized view without variable defined, VFP will ask you for the value of variable. If you respond with '1 ' (exactly 10 charactes long) the query returns 1 record. If however you predefine the value of variable = '1 ' (same 10 characters), THE QUERY RETURNS ZERO RECORDS! Remote views constructed and saved in a VFP database exhibit this same behavior.
The queries seem to run OK if the value of variable has NO TRAILING SPACES!

The only workaround I have found is to dynamically construct the SQL statement just prior to execution like this:
"SELECT * FROM MyTable WHERE PrimKey = '" + padr(variable, 10) + "'"
(WHAT A BOTHER!)

Anybody have an answer to my problem or a better workaround?

COMPLAINT DEPT: Also for some reason a parameterized SQL statement like "SELECT * FROM MyTable WHERE PrimKey = ?variable" works unchanged on both FoxPro and remote data (A BIG PLUS!), but a parameterized UPDA
Répondre
Fil
Voir

Click here to load this message in the networking platform