Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
1
Erster Beitrag:
vor 4 Monaten, 2 Wochen
Beteiligte Autoren:
Curtis

[WD20] Reconnect to Original Analysis [SOLVED]

Startbeitrag von Curtis am 06.12.2017 00:11

EDIT: I solved it. The issue was a stupid mistake. I had two different analysis folders in my project. I used the old one instead of the current one.

I have an app where I connect to our main server with the following code.

MainServer..Server = MyServer
MainServer..Database = MyDb
MainServer..User = MyUser
MainServer..Password = MyPassword
MainServer..Provider = hAccessHFClientServer

IF NOT HOpenConnection(MainServer) THEN
Error(HErrorInfo())
ELSE
HChangeConnection("*", MainServer)
END


One of the features of this app needs to connect to our customer databases. I use the following code.

CustomerDatabase..Server = sServer
CustomerDatabase..Database = sDatabase
CustomerDatabase..User = sUser
CustomerDatabase..Password = sPassword
CustomerDatabase..Provider = hAccessHFClientServer

IF NOT HOpenConnection(CustomerDatabase) THEN
Error(HErrorInfo())
ELSE
HChangeConnection("*", CustomerDatabase)
END

// Open the customers analysis
IF NOT HOpenAnalysis(fExeDir() + "\CustomerAnalysis.wdd") THEN
Error(HErrorInfo(hErrMessage))
END


This all works well, but when it comes time to reconnect to the main server and the original analysis I'm having issues. To do this I call the first block of code again, but I also add HOpenAnalysis().

IF NOT HOpenAnalysis(MyOriginalAnalysis.wdd") THEN
Error(HErrorInfo(hErrMessage))
END

When I try to access parts of my app that need the original analysis I get errors like "Payments file unknown". MyOriginalAnalysis.wdd is the original analysis file from this project directory. I have also tried HOpenAnalysis("").

Antworten:

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.