Focal Point
[SOLVED] MS SQL Server SQL Passthrough

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

March 09, 2020, 01:33 PM
Krishna.edara
[SOLVED] MS SQL Server SQL Passthrough
Hi,

We are using MSSQL Server for our reporting, I added new adapter on the server and tested, everything looks good. But when I try to some SQL pass through for a report I`m receiving following error message
" (FOC1671) CONNECTION MSSQL_MPS2 IS NOT DECLARED FOR INTERFACE SQLMSS"

My Code:

 SQL SQLMSS SET SERVER MSSQL_MPS2
SQL SQLMSS SET CONVERSION LONGCHAR ALPHA
SQL SQLMSS SET VARCHAR OFF
SQL SQLMSS EX bimps2.dbo.procedure 'paay','CYPQ','T','9050';



Please let me know what is the issue.

Thanks

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


WebFocus-8/Windows/HTML, PDF, EXCEL
March 09, 2020, 02:36 PM
BabakNYC
Add this to your code and see what you get:
SQL SQLMSS ?

If you have multiple connections defined, the connection named in the first SET
CONNECTION_ATTRIBUTES command serves as the default connection. You can override
this default using the SET DEFAULT_CONNECTION command.

ENGINE SQLMSS SET DEFAULT_CONNECTION connection_name

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


WebFOCUS 8206, Unix, Windows
March 09, 2020, 03:29 PM
Krishna.edara
 An error has occurred
Detail:
(FOC1450) CURRENT SQLMSS   INTERFACE SETTINGS ARE :

(FOC1758) CURRENT ISOLATION LEVEL IS          -  : RC
(FOC1496) AUTODISCONNECT OPTION IS            -  : ON FIN
(FOC1499) AUTOCOMMIT OPTION IS                -  : ON COMMAND
(FOC1491) FETCH BUFFERING FACTOR              -  : 100
(FOC1755) CURSORS TYPE IS                     -  : NOT SET
(FOC1723) TRANSACTION MODE IS                 -  : LOCAL
(FOC1441) WRITE FUNCTIONALITY IS              -  : ON
(FOC1445) OPTIMIZATION OPTION IS              -  : ON
(FOC1763) IF-THEN-ELSE OPTIMIZATION IS        -  : ON
(FOC1709) NCHAR OPTION IS                     -  : SBCS
(FOC1671) CONNECTION MSSQL_MPS2 IS NOT DECLARED FOR INTERFACE SQLMSS
(FOC1671) CONNECTION MSSQL_MPS2 IS NOT DECLARED FOR INTERFACE SQLMSS
(FOC1400) SQLCODE IS -1 (HEX: FFFFFFFF)
(FOC1500)  :  SQL OLE DB Interface: Could not find the default Connection: No SET
(FOC1500)  :  CONNECTION_ATTRIBUTES or SET USER Command has been entered.
L    (FOC1405) SQL PREPARE ERROR.
ERROR AT OR NEAR LINE     12  IN PROCEDURE ADHOCRQ
(FOC305) SPECIFIED LABEL NOT FOUND: ERROR 

This is the message I received from APP Studio

when I test Adapter on the server, it was success
 Microsoft SQL Server Adapter Test: Successful ( MSSQL_MPS2 ) 

This message has been edited. Last edited by: Krishna.edara,


WebFocus-8/Windows/HTML, PDF, EXCEL
March 09, 2020, 03:33 PM
BabakNYC
I don't see a Default Server name. Try the syntax I provided above for setting a default connection.


WebFOCUS 8206, Unix, Windows
March 09, 2020, 03:39 PM
Krishna.edara
I added as bellow, still same error

 SQL SQLMSS ?
ENGINE SQLMSS SET DEFAULT_CONNECTION MSSQL_MPS2
-*SQL SQLMSS SET SERVER MSSQL_MPS2
SQL SQLMSS SET CONVERSION LONGCHAR ALPHA
SQL SQLMSS SET VARCHAR OFF
SQL SQLMSS EX dbo.sp_report_customersetup 'paay','CYPQ','T','9050'; 

This message has been edited. Last edited by: Krishna.edara,


WebFocus-8/Windows/HTML, PDF, EXCEL
March 09, 2020, 03:53 PM
BabakNYC
On the reporting server right click MSSQL_MPS2 and click test. What do you see?


WebFOCUS 8206, Unix, Windows
March 09, 2020, 04:07 PM
Krishna.edara
It is successful
This is the message I received.
Microsoft SQL Server Adapter Test: Successful ( MSSQL_MPS2)  



WebFocus-8/Windows/HTML, PDF, EXCEL
March 09, 2020, 04:10 PM
FP Mod Chuck
Krishna

I found this on techsupport. It sounds like your adapter is configured under SQLODBC not SQLMSS

Diagnostics

Applications using ENGINE SQLMSS result in an error: FOC1671 MSSQL IS NOT DECLARED
Case: 190826028 Product: Reporting Server Release: 82 8204 Primary OS: Windows Date: 2019-08-27
Case information refers to the Product, Release, and OS for which this question was asked. The solution may apply to other Products, Releases, and Operating Systems.

Symptom

(FOC1671) CONNECTION MSSQL IS NOT DECLARED FOR INTERFACE SQLMSS

Problem

Applications that use the following command result in the error message above.

ENGINE SQLMSS SET DEFAULT_CONNECTION MSSQL

Solution

The issue is the use of the wrong SQL Server Adapter engine specified by SQLMSS. SQLMSS is the OLEDB version of the adapter, but the ODBC adapter is configured which uses an engine of MSODBC. Specifying the MSODBC engine resolved the issue.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 10, 2020, 08:39 AM
Krishna.edara
Thank you Chuck,

That fixed my issue.

Thanks,
Krishna...


WebFocus-8/Windows/HTML, PDF, EXCEL