Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 4 Jahren, 5 Monaten
Letzter Beitrag:
vor 4 Jahren, 5 Monaten
Beteiligte Autoren:
ICI, GuenterP

GPW and HF/CS

Startbeitrag von ICI am 05.11.2013 23:35

Hi to all
Analysis is defined like HF Classic and I change connection into Project code into HF/CS
I enable User Groupware (GPWxxxx) and change it to "manual start" but on runtime can not make
and change connection to GPW files on HF/CS. All files are always created into
C:\MyProjects\Project_Folder\EXE\ or GPW depend on GpwOpen(".",".")

Help say to check gpwinitanalysis() but this function is started and can not be stoped or changed to False. After starting project gpwinitanalysis is True. I try few solutions here on forum I can find but it does not work. I success this situation with WD16 but with WD18 connection can not be changed to HF/CS.

Is there someone with success GPW on HF/CS with directory MYdatabase\GPW on server side?
Can you share and explain options you make on UserGroupware and code you write for it.

Thank you in advance !

Antworten:

Hi ICI,

never ever use GpwInitAnalysis(..) !!
http://doc.pcsoft.fr/en-US/?3041005&name=gpwinitanalysis_function&q=gpwInitAnalysis
see my annotation to it!

There are ways to access the gpw-files from outside the gpw-component - but unfortunately NOT by using GpwInitAnalysis(..)!

von GuenterP - am 06.11.2013 03:57
Hi Guenter

I do not use GpwInitAnalysis(). I just write about problem with it. It seems this function() is already activated before I make connection, 'cause I can not make connection (refused) . I try all possible ways to gwpOpenConnection(MyConn) but without success.

If I change UserGroupWare all to automatic and choose HF/CS connection in 7TAB than GPW folder is created on server but how than to change name of the server or database or port, when it needed on user side ??????????

Please, if someone success with it to share it with forum.
Thank you !

von ICI - am 06.11.2013 07:53
Hi ICI,

the trick maybe, that you have to open connection to Groupware first and HFCS connection afterwaeds. I give you a code example here. This one works definitely! Explanation: gpw-files are located in the directory of the datafiles here.


// Groupware - OpenConnection
IF gpwOpenConnection("MyGPWConn",NoSpace(MyHFCSAdminName),NoSpace(MyHFCSAdminPassword),MyServerAndPort,NoSpace(MyDatabaseName),hAccessHFClientServer,hOReadWrite,"ENCRYPTION=FAST") = False THEN
Error("Fehler = "+CR+HErrorInfo(hErrServer))
EndProgram("Programm wird nach gpwOpenConnection = False beendet!")
ELSE
HFCSLoginWiederholung:
MyC = gpwOpen("","")
IF MyC gpwOk THEN
IF MyC = gpwError THEN EndProgram("Fehler bei GPW-Initialisierung!")
IF MyC = gpwCancel THEN EndProgram("Log-In vom Benutzer abgebrochen!")
IF MyC = gpwInvalidPassword THEN Error("Falsches Passwort!"); GOTO HFCSLoginWiederholung
IF MyC = gpwUnknownUser THEN Error("Unbekannter Benutzer!"); GOTO HFCSLoginWiederholung

END
END


// Connection to HFCSDatabase
MyConnection..User = NoSpace(MyHFCSAdminName)
MyConnection..Password = NoSpace(MyHFCSAdminPassword)
MyConnection..Database = NoSpace(MyDatabaseName)
MyConnection..Server = MyServerAndPort
MyConnection..Provider = hAccessHFClientServer
MyConnection..Access = hOReadWrite
MyConnection..CursorOptions = hServerCursor+hDynamicCursor+hOptimisticCursor
MyConnection..ExtendedInfo = ""
MyConnection..CryptMethod = hCryptStandard

IF NOT HOpenConnection(MyConnection) THEN
Error("HFSQL: HOpenConnection: ","Die Verbindung zu "+MyServerAndPort + " kann nicht errichtet werden !",HErrorInfo(hErrFullDetails))
RETURN
END

MyConnectionName = MyConnection..Name

//Info("Connection "+MyConnectionName+" established successfully !","Database "+MyConnection..Database+" found / generated !")

// Die Verbindung aller Dateien einrichten:
WHEN EXCEPTION IN
HChangeConnection("*",MyConnection)
DO
// Fehler aufgetaucht:
EndProgram("HFSQL: Fehler bei HChangeConnection aufgetreten !",HErrorInfo(hErrFullDetails))
END




von GuenterP - am 06.11.2013 10:07
Hi Guenter

Thank you for your explanation and code.
I will try to implement your code here with WD18 UserGroupware .

Another solution:
User Groupware - Description
1. Integration -> Custom ->Checkbox: Mode Compatible with version 17 and earlier
2. Runtime->Manual start
3. Files -> Now you get options to choose location for HF Classic files
4. Choose: Location of rights files

Now all windows and functions from earlier versions and style are transfered into project directory and gpwopenconnection() and other work normaly and as usual. Why this option for connection is not enabled for WD18 version User Groupware I do not know.
If I uncheck WD17 compatible mode, this combo is not visible anymore...

Thank you !

von ICI - am 06.11.2013 13:02
Hi Guenter,

I am already implement and try your code and it work correct. Even in WD18 mode.
GpwOpenConnection(), like you write, must be opened before HOpenConnection().
In other way there is no chance to hChangeConnection() to server side, with manual start.

Thank you again.
-1 NAKLOFEN pill for my head. :)

von ICI - am 06.11.2013 13:20
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.