PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 23 → WX - Trabalhando com SQL com Query Design ou codigo sql
WX - Trabalhando com SQL com Query Design ou codigo sql
Débuté par BOLLER, 26 aoû. 2018 18:50 - Aucune réponse
Membre enregistré
2 864 messages
Popularité : +89 (91 votes)
Posté le 26 août 2018 - 18:50
Trabalhando com SQL no Wx









//EVITA SQL INJECTOR

QRY_Insert_Config.Paramt001_descricao = "Valida Cliente"
QRY_Insert_Config.Paramt001_valor = "SIM"

IF HExecuteQuery(QRY_Insert_Config,hQueryDefault) = True THEN

Info("ok")

ELSE

Info("ERRO")

END


ou

DsQryDinamica is Data Source

sSQL_CODE is string = [

INSERT INTO t001_config
(
t001_descricao,
t001_valor
)
VALUES
(
@Paramt001_descricao@,
@Paramt001_valor@
)

]

sSQL_CODE = Replace(sSQL_CODE,"@Paramt001_descricao@","Valida Cliente")
sSQL_CODE = Replace(sSQL_CODE,"@Paramt001_valor@","Sim")

IF HExecuteSQLQuery(DsQryDinamica,
MyConnection,
hQueryDefault+hQueryWithoutCorrection,
sSQL_CODE) = True THEN

Info("ok")
ELSE
Info("ERRO")
END


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/