PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → postgreSQL4WD
postgreSQL4WD
Débuté par Jim, 24 avr. 2007 08:32 - 3 réponses
Posté le 24 avril 2007 - 08:32
How do you integrate the DLLs for postgreSQL4WD into windev?
Posté le 24 avril 2007 - 10:38
>How do you integrate the DLLs for postgreSQL4WD into windev?
The sqlManagerX forum is probably the more adequate place to answer this type of question. Anyhow, it's quite simple: you place the DLL in the exe directory and import the classes which I assume are called c PostGreSQL4WD, c log4WD
Here an example of the ini code for Firebird:

//project ini code:
fb4wd is c FB4WD
//sqlMX est un SQLManagerXV4 ... or whatever version is current in case you want to use SQLManagerX
fb4wd:SetDateFormat("AAAAMMJJ")
fb4wd:mySQLSetMode(2) // on repasse en mode SQL
estConnecte is boolean
strSQL is string
IF NOT ConnectDB() THEN Close()
fCurrentDir()
///////////////////////////////////////////////
//global procedure
PROCEDURE ConnectDB()
LOCAL
v retCode is boolean
v retCode = fb4wd:mySQLConnecte("localhost","C:\Mes Projets\fbTest SQLMX\Exe\fbTestWD7.fdb", "SYSDBA", "masterkey")
IF (v retCode = True) THEN
estConnecte = True
RESULT True
ELSE
Erreur("Impossible de se connecter à la base de donnée 'test'.", "Erreur n° " + fb4wd:mySQLErreur, fb4wd:mySQLGetErrorMessage())
RESULT False
END
/////////////////////////////////////////////////////////////
//Closing project
IF estConnecte THEN
fb4wd:mySQLDeconnecte()
END
Posté le 24 avril 2007 - 10:39
>How do you integrate the DLLs for postgreSQL4WD into windev?
hi jim
for all alternatif acces , you can place the dll in the exe directory. with this location you can have more than one version of dll.
for postGreSQL4WD you need PostGreSQL4WD.dll and libpq.dll in the directory.
regards
Posté le 24 avril 2007 - 12:01
Sorry, forgot to mention that the sample code was originally supplied by Emmanuel Lecoester.
Furthermore, just noticed that the SQLManagerX site says the DLL postgreSQL4WD.dll and libpq.dll should go into WINxx\SYSTEM32.