Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] dynamic connection string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] dynamic connection string
 Login/Join
 
Gold member
posted
I have an html page that will have a dropdown to various databases I can go to. Based on what they choose in the dropdown, how can I dynamically or programmatically create a connection string?

This message has been edited. Last edited by: Kerry,


Version: 8.0.0.6
Windows platform
All output formats will probably be used.
 
Posts: 80 | Registered: June 25, 2009Report This Post
Expert
posted Hide Post
Have a -INCLUDE to a program that looks up the database type and credential information in a file that you have created, write the information to a SAVE file, then -READ into amper variables that you can use in the connect string. Then depending on the data base, you may need to set a default connection.

Here is an example of one for DB2 though you could make the engine type a variable as well.

ENGINE DB2 SET CONNECTION_ATTRIBUTES  &CONN/&DB_user,&DB_pass
ENGINE DB2 SET DEFAULT_CONNECTION &CONN


You would have to put logic around this of course. And each program would need the -INCLUDE.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
This is what we do here.

We have a -INCLUDE that processes a variable that is the name of the DB.

All you need is a list of names.

I would suggest making this secure, as it would have user/pass info.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
We store them in a DBA-protected data base.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
The other option is to encrypt the file, and set &ECHO to OFF, when processing.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
<JG>
posted
quote:
ENGINE DB2 SET DEFAULT_CONNECTION &CONN


Set up the adapter connections in edasprof.prf and if you are using static ids and passwords
and not user specific ones then that's all you need.
 
Report This Post
Gold member
posted Hide Post
but how do I get the value of &Conn from my html page to the engine?


Version: 8.0.0.6
Windows platform
All output formats will probably be used.
 
Posts: 80 | Registered: June 25, 2009Report This Post
Expert
posted Hide Post
How did you create your html page? Did you use the HTML Composer? Did you reference a focexec that had the amper variable &CONN in it. If the answer is yes, then the page's submit button will automatically provide the value of &CONN to the focexec.

I would suggest that you start smaller. Practice passing the value for country to a focexec against the car file until you understand that process.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] dynamic connection string

Copyright © 1996-2020 Information Builders