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.
I've been doing regular SQL statements and calling stored procedures for a while but I just tried to use a user defined fucntion in an SQL statement and I get an error:
(FOC1400) SQLCODE IS 208 (HEX: 000000D0) XOPEN: 42S02 : Microsoft OLE DB Provider for SQL Server: [42S02] Invalid object name 'd : bo.fnWeekdaysDateDiff'. [42S02] Invalid object name 'dbo.fnWeekdaysDateD : iff'. [42000] Statement(s) could not be prepared. [] Deferred prepare co : uld not be completed.
I've searched the Inforesponse Support database and it's not in Supported nor Unsupported features for SQL
The SQL works fine outside WF:
SELECT tbl0107_frmMedInfo_CCReports_ID AS ID, 'Investigation' AS TYPE, CASE InvestigationStatus WHEN 2 THEN dbo.fnWeekdaysDateDiff (InvestigationOpenDate, InvestigationClosedDate) ELSE dbo.fnWeekdaysDateDiff (InvestigationOpenDate, GetDate()) END AS NBDAYS, CASE InvestigationStatus WHEN 0 THEN '(New)' WHEN 1 THEN '(Open)' WHEN 2 THEN '(Closed)' WHEN 3 THEN '(Pending)' END AS STATDESC FROM pms_Infomanager..tbl0107_frmMedInfo_CCReports
I think this is an MS SQL Issues. If you look at the error message MS SQL Returned this error message. If you have multiple SQL Connections or multiple database make sure you set the correct one. If multiple Database try using the fully qualified name if the FROM Statement.
My question would be; Does the user for the Data Adapter connection on the WF Reporting Server have the same priveledges in SQL server as you do when you run the query standalone?
WF 7.6.10 / WIN-AIX
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005
Originally posted by KevinG: My question would be; Does the user for the Data Adapter connection on the WF Reporting Server have the same priveledges in SQL server as you do when you run the query standalone?
Yes! the IBI user has execute privileges on the function
Originally posted by TexasStingray: I think this is an MS SQL Issues. If you look at the error message MS SQL Returned this error message. If you have multiple SQL Connections or multiple database make sure you set the correct one. If multiple Database try using the fully qualified name if the FROM Statement.
Hope this helps
Thanks for your idea TexasStingray, I've added the databasename in front of the ownername when calling the function and it worked!
OK... "Trusted Security" is one major difference between your configuration and the ones I have used over the years. We use explicit security. We have control that way over the priveledges the "Explicit" user has in the RDBMS. Since trusted security uses an impersonated operating system login, could it be that whatever login is used by the IWay adapter does not have permissions to the user defined function? It has been a couple of years since I have dealt directly with MSSQL Server and WebFOCUS, but we have no difficulty with our configuration against DB2...other than occasionally building a SQL statement that is too large to pass.
Anyone else have any other ideas?
Kevin
WF 7.6.10 / WIN-AIX
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005