Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 5 Jahren, 1 Monat
Letzter Beitrag:
vor 5 Jahren
Beteiligte Autoren:
GuenterP, Alexandre Leclerc

[WD18] PCS Groupware gpwOpenConnection(..)

Startbeitrag von GuenterP am 02.07.2013 15:52


fore me, it's simply impossible to connect to HyperFileSQL C/S v18-Groupware using the command gpwOpenConnection(..) neither with a new connection variable nor using the same one as the application uses. Has anyone of you connected successfully using gpwOpenConnection(...) ???


Hi Guenter,

Here is a code snipet we use all the time and works very well: (I only translated the comments)

// Calculate sub-folder name
m_sRépertoireGPU = m_cnxConnexion..Provider = hAccèsHF7 ? ComplèteRep(m_cnxConnexion..Source)+"gpw" SINON "gpw"

// Open connexion to GPW
SI m_cnxConnexion..Provider = hAccèsHFClientServeur ALORS
SI PAS gpwOuvreConnexion(m_sGPWNomConnexion,m_cnxConnexion..Utilisateur,sBDDMotDePasse,m_cnxConnexion..Source,m_cnxConnexion..BaseDeDonnées,hAccèsHFClientServeur) ALORS
// Since version 180046j we must init. connexion to user gpw in classic mode to make it work properly.
SI PAS gpwOuvreConnexion(m_sGPWNomConnexion,m_cnxConnexion..Utilisateur,sBDDMotDePasse,m_sRépertoireGPU,m_cnxConnexion..BaseDeDonnées,m_cnxConnexion..Provider) ALORS

- m_sGPWNomConnexion is a connexion name (like "ConnexionGPU")
- m_cnxConnexion is our main software connexion
- sBDDMotDePasse is a copy of the main connexion password (because we can't read it from the main connexion variable - suggestion sent to PCSoft).

Then you can do what you want. Usually we call gpwLogin("","",m_sRépertoireGPU,m_sRépertoireGPU) to create the files if they do not exist, because we handle most of the process manually. (Our own login box, etc.)

Kind regards,
Alexandre Leclerc

von Alexandre Leclerc - am 12.08.2013 14:21
Hi Alexandre,

thanks a lot for your example! Got it to work as well - but only with parameters in the command line of gpwOpenConnection(..) like you do, but not using a connection variable. I didn't realize in my first tries that the problem was there .. dummy me.

Thank you!

von GuenterP - am 12.08.2013 14:39
Hi all,

do not use gpwInitAnalysis() see:

before connecting groupware files or defining groupware file locations using gpwOpen(.. , ..) !!

gpwInitAnalysis() will invariably 'nail' the Groupware-directories to

.. \exe\gpw_ProjectName

there's no way to change these directories thereafter!

(I intended to access the groupware files from my program directly and thought it would be a good idea to initialise the groupware analysis right after declaring the variables in project code. Wrong!!)

von GuenterP - am 14.08.2013 14:02
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.