FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 2024
→
Problem with VFP Numeric fields
Problem with VFP Numeric fields
Iniciado por Dennis, 15,ene. 2021 22:15 - 1 respuesta
Conéctese…
Dennis
#1
Publicado el 15,enero 2021 - 22:15
Hello,
I want to migrate a huge Foxpro application and I am looking into WINDEV. After spending some hours trying things out, I ran into one problem I could not solve.
Because I want to transition in parts, I have to work with the VFP database. I use the VFPOLEDB driver and reading and writing works fine except when my WHERE condition contains a numeric field:
wSQL
is
SQL Query
=
[
SELECT * FROM USER WHERE id = 3
]
HExecuteQuery
(
wSQL
,
hQueryDefault
)
If the fieltype "id" is an integer it works. But if it's type is numeric(2,0) then the result is as if the 3 is a 0. So I get the record from user with the id 0. Same is when I use "where id > 3", I get all records with id > 0 and with "where id < 3" I get records with id < 0.
This returns nothing:
HExecuteQuery
(
wSQL
,
hQueryWithoutCorrection
)
This returns the correct value:
HExecuteQuery
(
wSQL
,
MyCon
,
hQueryWithoutCorrection
)
Can someone explain this to me why it works withoutout naming the connection when the field is an integer, but when the fiels is numeric, I have to name the connection and also use the parameter?
It seems like windev is altering the query in a way that the database can not handle the comparison.
Is there a way I can see what the query looks like that WINDEV is sending to the database?
Thank you all.
Informar
0
0
Dennis
#2
Publicado el 17,enero 2021 - 16:07
I figured it out:
Changing the field format in the analysis from "decimal (WLanguage numeric), integer part: 3, decimal part:0" to "integer, format 999" worked.
I also had problems when modifying a record with a logical (boolean) field. Changing it in the analysis from "boolean" to (integer, format 9) worked, too.
I don't know if this is the best approach, because I have to change a lot of fields in the analysis, but it is the only way I got it working.
Informar
0
0
→ Volver a WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto