Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating a n(10,2) field via CA
Message
De
28/12/2015 12:33:07
 
 
À
28/12/2015 11:48:17
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629328
Message ID:
01629330
Vues:
40
>I have a cursoradapter with .wheretype=3 and a case where sending updates fails because of a n(10,2) field. The field is numeric(8,2) on SQL side, and n(10,2) in .cursorSchema property. The update statement looks like this:
>
>update ... where ... and myNumField=0.57999999999999996 and ...
>
>The value in the table is, of course, 0.58 and I don't know why does the VFP's parser convert the value into this IEEE equivalent and whether there's a setting somewhere to set it right. If everything else fails, I can switch to .whereType=1, but I'd rather not do that if I don't have to (as it would require using a subclass of the CA that I use everywhere and then still wouldn't fix the problem if it reappears elsewhere, where I can't use wheretype 1).
>
>Anyone know a trick?

You could clobber the SQL statement into something workable in a .Beforeupdate, but that would only be patching things up and still require subclassing.
We usually use .wheretype=4 but with incrementing integers instead of timestamps
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform