Focal Point
[CLOSED] SET Server Name runtime.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3227073196

June 18, 2019, 09:51 AM
Rajesh Singh Negi
[CLOSED] SET Server Name runtime.
Hi Guys let suppose we have two server configured in our client can we switch between these servers at runtime when a user select QA then it will hit QA server and when user select PROD then it will hit prod server ?
it like changing application path like we do using APP PATH..

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8.x
Windows
PDF,HTML,XLSX
June 18, 2019, 01:59 PM
MartinY
You need to have a variable in your master file which will be set according to selection
Same technic as explain in the following (except the RC part) : variable master


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 18, 2019, 05:46 PM
Waz
This is very much reliant on your set up.

Are the Tables the same from UAT to Prod ?
Are the DB's in the same server or different servers ?

You could use Martin's answer, or another option is to base the change on the connection.

The idea is to have two connections defined in the reporting server, and use ENGINE {db server type} SET DEFAULT_CONNECTION {servername} to point to the connection defined.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 19, 2019, 04:06 AM
Rajesh Singh Negi
Hi Martin and Waz thanks for replying.
Yes we do have an option we can just change the connection at runtime and have two adapters available for PROD and QA.
But can we change the &_EDA_NODE inside a fex procedure


Webfocus 8.x
Windows
PDF,HTML,XLSX
June 19, 2019, 04:14 AM
Waz
No, once you are running the fex it is already in a reporting server (EDA Node).

Your options are to set the node on the page running the fex, possibly setting the node in site.wfs ?? or possibly calling the other server and executing the code there (a bit more infrastructure setup needed).

There is probably other options, but that is first hings that came to mind.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

June 19, 2019, 04:17 AM
Tony A
Always keep the documentation links in your favourites

Reporting Language
Parameterising Master and Access files

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10