TClientDataset1.Filter Error locale
Tengo una App Datasnap y estoy teniendo problema con un filtro si la PC tiene el idioma Italy, si el idioma es US todo funciona bien.
If the language of the PC is Italy this filter return 0 var pricefrom,priceto :Double; begin Tclientdataset1.filter := format( ' (pricefrom >= %f and priceto <= %f) ',[1,7000000]); Tclientdataset1.Filtered:= True; end; If the language of the PC is US this filter work fine var pricefrom,priceto :Double; begin Tclientdataset1.filter := format( ' (pricefrom >= %f and priceto <= %f) ',[1,7000000]); Tclientdataset1.Filtered:= True; end; I'm getting crazy with this, i had tried everything, some help is appreciated |
Hola dison.
Por favor, recuerda usar los TAG's : Con respecto a tu consulta, me quedan estas dudas:
Por si te sirviera de ayuda, un ejemplo de como filtrar por el campo XXX aquellos valores comprendidos entre 101.25 y 1029.33:
Saludos :) |
The problem is about the Locale setting of the PC and the decimal separator.
I resolved this with Trunc function to extract the integer part. Thanks. |
Cita:
Cita:
Y si... es claro que tomando sólo la parte entera el problema desaparece (al igual que el separador decimal), la dificultad se presenta cuando precisas el valor como número decimal. Saludos :) |
La franja horaria es GMT +2. Ahora son las 11:05:55. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi