Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Default Connection ... with Table File?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Default Connection ... with Table File?
 Login/Join
 
Gold member
posted
I know you can set or override a default connection with SQL passthru, but is there a way to do essentially the same thing with a TABLE FILE request? I'm not seeing anything documented. Thanks much for any insight.

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 52 | Location: Merrimack, NH | Registered: August 17, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Deborah,

APP PREPENDPATH foldername places that foldername at the beginning of the path, modifying the WebFOCUS PATH set in EDASPROF.prf

Tom


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks for the reponse, and so quickly! Does this also apply when I need to reference a different server though?
 
Posts: 52 | Location: Merrimack, NH | Registered: August 17, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Deborah,

No, that is APP MAP servername/path; we usually place that in EDASPROF.prf so it is automaticalyy added to the PATH...

Here's an ecxample:

APP MAP DDNAME "//servername/path1/path2/etc"

Tom


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Deborah,

Are you looking to override the CONNECTION attribute in the ACX file for an MFD?


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks. This would actually be the connection specified in the ACX file. We routinely override this in a SQL Passthru statement with "ENGINE SQLSYB SET DEFAULT_CONNECTION servername" but I have an app where the I need to change this for some TABLE FILE requests. I can change the ACX files, I just thought that it would be easier to do it on the report side, if it is doable anyway.
 
Posts: 52 | Location: Merrimack, NH | Registered: August 17, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Deborah,

I think if you remove the CONNECTION attribute from the ACX file it will use the DEFAULT database. I think. I'm not sure. This of course would require issuing the ENGINE statement all the time sinc the ACX would not tell it what to use.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Deborah,

We usually put the acx and mas into a different folder for a different server and use APP PREPENDPATH to access that table...

Tom


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Deborah,
I have a similar situation where I have more than one connection to access different databases. For example:
ENGINE SQLMSS SET CONNECTION_ATTRIBUTES ABC ...
ENGINE SQLMSS SET CONNECTION_ATTRIBUTES DEF ...
ENGINE SQLMSS SET CONNECTION_ATTRIBUTES XYZ ...

The default connection is the first one.
In order to access another database through the second connection I use in my FOCEXEC the following:
SQL SQLMSS SET SERVER DEF
Of course DEF could be a parameter.
Does this help?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1934 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
quote:
SQL SQLMSS SET SERVER DEF


Thanks. It perhaps helps, but this looks like code you would use with a SQL statement, not a TABLE FILE statement. I'll try it though. Thanks again.
 
Posts: 52 | Location: Merrimack, NH | Registered: August 17, 2006Reply With QuoteReport This Post
<JJI>
posted
Deborah,
quote:
SQL SQLMSS SET SERVER DEF


This statement is indeed no statement that you should use in TABLE FILE code. You should use it just before the TABLE FILE code, to set the connection that has to be used for the code that follows. Hope this helps,

This message has been edited. Last edited by: <JJI>,
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Deborah and JJI,

Correct!
SQL SQLMSS SET SERVER DEF
has to be issued prior any TABLE request which wants to access the database connected by DEF.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1934 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
I ended up just using SQL Passthru to gather the data first. Thanks for the help!
 
Posts: 52 | Location: Merrimack, NH | Registered: August 17, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I was looking for a solution to this same problem, but the suggested statement didn't change anything.
In our case, I used:
SQL SQLORA SET SERVER OracleUnilabTst


Instead, I copied the ENGINE SQLORA SET CONNECTION_ATTRIBUTES statement relevant to the database to query over from the edasprof.prf file and adjusted it to so that the name was that of the database to override. I put that line before the first TABLE request in our procedure.

For example:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES AdapterName TNS_NAME/USERNAME,1234567890ABCDEF1234567890ABCDEF


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1644 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Default Connection ... with Table File?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.