miércoles, 26 de julio de 2023

Conexión BD MySQL

Instalar

wd240msql64.DLL
libmysql.dll
en
C:\PC SOFT\WINDEV 24\Programs\Framework\Win64x86
y también en el ejecutable


 IF InTestMode() = True THEN
////*******************************************************************
MiConTest is Connection   //conexión de pruebas
MiConTest..User = "supervisor"
MiConTest..Password = "supervisor"
MiConTest..Server = "localhost"
MiConTest..Database = "FarmaWD"
MiConTest..Provider = hNativeAccessMySQL
MiConTest..Access = hOReadWrite
MiConTest..ExtendedInfo = "Extended information"
MiConTest..CursorOptions = hClientCursor
MiConTest..Caption               = "AMBIENTE DE PRUEBAS"
HOpenConnection(MiConTest)   // Open the connection
HChangeConnection("*", MiConTest) // Assign the connection to all data files
ELSE
MiConFarma is Connection   //conexión de produccion
MiConFarma..User = "supervisor"
MiConFarma..Password = "supervisor"
MiConFarma..Server = "localhost"
MiConFarma..Database = "FarmaWD"
MiConFarma..Provider = hNativeAccessMySQL
MiConFarma..Access = hOReadWrite
MiConFarma..ExtendedInfo = "Extended information"
MiConFarma..CursorOptions = hClientCursor
MiConFarma..Caption        = "AMBIENTE DE PRODUCCION"
HOpenConnection(MiConFarma)   // Open the connection
HChangeConnection("*", MiConFarma) // Assign the connection to all data files
END

No hay comentarios.:

Publicar un comentario

Try catch end

 // -------------------------------------------------- // Procedure principal que executa uma query com tratamento de exceção // -----------...