Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Stored Procedure call inside Qlik Sense

Hello Everyone,

I am new to Qlik Sense and slowly learning it.

I wanted to connect to a stored procedure which is present on a SQL Server.

I created the connection string and the test connection shows as success.

Then I went ahead and wrote the below commands to run the SP:

LIB connect To 'Server_name';

Load *;

SQL EXEC Proc_name ;

After pressing load data, it shows following error-

Could not fetch connection by name using identifier server_name

The error occurred here:

LIB connect To 'server_name'    

Any heads up on this shall be highly appreciated or what I might be missing?

8 Replies
sinanozdemir
Valued Contributor III

Re: Stored Procedure call inside Qlik Sense

Hi,

Are you trying to run the stored procedure on the QlikSense Server or Desktop Client?

Thanks

Not applicable

Re: Stored Procedure call inside Qlik Sense

Hi Sinan,

I am running on QlikSense Server.

sinanozdemir
Valued Contributor III

Re: Stored Procedure call inside Qlik Sense

Then the connection may not have been created on the server side or the connection name might be different than your ODBC name. I would check with your Qlik Server Admin.

Thanks

Not applicable

Re: Stored Procedure call inside Qlik Sense

By connection name you mean the server name right?

I am able to access the same server and use tables from it to create dashboards. Its just that the stored procedures are not happening.

sinanozdemir
Valued Contributor III

Re: Stored Procedure call inside Qlik Sense

So for example, a connection on my ODBC is name 'Test DB'. However, on the QlikSense server, it is named 'TEST_DB'. Do you see the difference?

This might be the first issue. If not, make sure that the stored procedure returns a table, not a single result.

Not applicable

Re: Stored Procedure call inside Qlik Sense

I will check about the names. As the error says about identifier problem I think its related to that.

I did check the connection (server name) it is the same, not sure whats happening

Not applicable

Re: Stored Procedure call inside Qlik Sense

This is my connection string in qlik sense:

OLEDB CONNECT TO [Provider=SQLOLEDB;Integrated Security=SSPI;Data Source=server_name;Initial Catalog=database1;]

what should I be looking at? and possible errors?

PS- This connection has been successful on test run

Not applicable

Re: Stored Procedure call inside Qlik Sense

to execute sql sp's you need to use an odbc connection rather than oledb