GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
Problem with VFP Numeric fields
Problem with VFP Numeric fields
Iniciado por Dennis, jan., 15 2021 10:15 PM - 1 resposta
Conecte-se…
Dennis
#1
Publicado em janeiro, 15 2021 - 10:15 PM
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.
Denunciar
0
0
Dennis
#2
Publicado em janeiro, 17 2021 - 4:07 PM
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.
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto