Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
REPLACE not working
Message
De
20/05/2005 16:29:06
 
 
À
20/05/2005 15:03:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01016322
Message ID:
01016352
Vues:
8
This message has been marked as the solution to the initial question of the thread.
>The below code works fine on my PC but under and EXE on a users PC it fails with an error 11 - function argument, value, type, or count is invalid.
>
>The original code used an IN (This.cAlias) and I replace that with a SELECT (This.cAlias) before the replace. I also added an 'X' to the end of each column that might be confused with a reserved word.
>
>Still get the same error. Anyone see anything wrong with this?
>
>
>      REPLACE namex     WITH LOWER( namex )                                  ,;
>              datetimex WITH DATETIME( YEAR( datex )                         ,;
>                                      MONTH( datex )                         ,;
>                                      DAY( datex )                           ,;
>                                      INT( VAL( SUBSTR( timex, 1, 2 ) ) )    ,;
>                                      INT( VAL( SUBSTR( timex, 4, 2 ) ) )    ,;
>                                      INT( VAL( SUBSTR( timex, 7, 2 ) ) ) )  ALL
>
try:
... WITH DTOT(datex);
   + INT(( VAL(LEFT( timex, 2 ))*60;
         + VAL( SUBSTR( timex, 4, 2 )))*60;
         + VAL( SUBSTR( timex, 7, 2 )))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform