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] SQL Server SQL Passthru Error

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] SQL Server SQL Passthru Error
 Login/Join
 
Member
posted
I am simply wanting to access an SQL Server DB and I continue to get the below error. Looked through the documentation and it seems the adapter syntax looks right. Am I missing something?

SET SQLENGINE = SQLMSS
ENGINE SQLMSS SET CONNECTION_ATTRIBUTES SQLFND1
-RUN

SQL
SELECT
SAPData.dbo.communication_log.tk_init,
SAPData.dbo.communication_log.date_ent
FROM SAPData.dbo.communication_log
;
TABLE
ON TABLE HOLD AS HOLD_TMP FORMAT ALPHA
END


-RUN
TABLE FILE HOLD_TMP
PRINT *
END


(FOC1400) SQLCODE IS -1 (HEX: FFFFFFFF) XOPEN: 00000
: (-1) [00000] JDBFOC>> describecols(): error: getMetaData call on stmt
: returned null ResultSetMetaData object!
L (FOC1405) SQL PREPARE ERROR.
0 ERROR AT OR NEAR LINE 20 IN PROCEDURE sql_server_test
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: HOLD_TMP
BYPASSING TO END OF COMMAND

This message has been edited. Last edited by: J.Biza,


WebFOCUS 7703
 
Posts: 18 | Registered: May 22, 2014Report This Post
Expert
posted Hide Post
Interesting,

I would have had
TABLE FILE SQLOUT
PRINT [blah blah blah]
ON TABLE HOLD AS HOLD_TMP FORMAT ALPHA
END


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
Guru
posted Hide Post
You connectino string looks to be missing something.

It should be:

ENGINE SQLMSS SET CONNECTION_ATTRIBUTES CONNECTION_NAME SERVER_NAME/USER_NAME,PASSWORD;DEFAULT_DATABASE

As in

ENGINE SQLMSS SET CONNECTION_ATTRIBUTES MYDB LOCALHOST/SA,Password123;TEST_DB

If you already have a connection set up called SQLFND1 and want to make sure your SQL pass through uses it then you want

ENGINE SQLMSS SET DEFAULT_CONNECTION SQLFND1

Hope this helps

Regards

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Member
posted Hide Post
I'm thinking my connection is good, but with metadata error, think I need an access file created??


WebFOCUS 7703
 
Posts: 18 | Registered: May 22, 2014Report This Post
Guru
posted Hide Post
You are doing sql pass thru so metadata/access file is not part of the issue.
Test the connection of the data adapter for SQLFND1.
Also try this alternative syntax.
  
ENGINE SQLMSS SET DEFAULT_CONNECTION SQLFND1
SQL SQLMSS PREPARE SQLOUT FOR
SELECT
SAPData.dbo.communication_log.tk_init,
SAPData.dbo.communication_log.date_ent
FROM SAPData.dbo.communication_log
;
END
-RUN

TABLE FILE SQLOUT
PRINT *
END 


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Member
posted Hide Post
The connection seems to be working as I can get to another DB. What exactly is this error tell me?


WebFOCUS 7703
 
Posts: 18 | Registered: May 22, 2014Report This Post
Virtuoso
posted Hide Post
You cannot do a TABLE FILE on an Alpha file without a reference. You can "READ" it but not "TABLE FILE" it.

SET SQLENGINE = SQLMSS
ENGINE SQLMSS SET CONNECTION_ATTRIBUTES SQLFND1
-RUN

SQL 
SELECT 
SAPData.dbo.communication_log.tk_init,
SAPData.dbo.communication_log.date_ent
FROM SAPData.dbo.communication_log;

TABLE
ON TABLE HOLD AS HOLD_TMP FORMAT ALPHA
END
-RUN

FILEDEF HOLD_TMP DISK <app>/hold_tmp.ftm

TABLE FILE HOLD_TMP
PRINT *
END


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
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
: (-1) [00000] JDBFOC>> describecols(): error: getMetaData call on stmt
: returned null ResultSetMetaData object!
is a SQL error, not a WebFOCUS error.

I imagine the complication is reading an SAP table using a JDBC connection.

I would generate WF metadata, then write a simple fex to read the table, and turn SQL traces on. Perhaps the generated SQL will give you a clue as to how to code your SQL Passthru.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
The table I created had a reserve word in the column title and it also didn't like the varchar(max) field format. Recreated the table with those changes and works fine. Thanks everybody for the help.


WebFOCUS 7703
 
Posts: 18 | Registered: May 22, 2014Report 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] SQL Server SQL Passthru Error

Copyright © 1996-2020 Information Builders