Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

odbc read failed while executing sp

hi folks,

i have a table having 14000 records and 3 columns in a table called tableserver. i created a sp as following in sql server

create procedure spc_test

as

begin

     select top 1 col1,col2,col3 from tableserver

end

i tried to exec this sp through Qlik

ODBC CONNECT32 TO server;

SQL exec spc_test;

getting following error while reloading the script

ODBC read failed

SQL exec spc_test

but the same time if i query the records in qlikview, it fetching all the 14000 records

ODBC CONNECT32 TO server;

SQL select * from tableserver ;

Request you to kindly clarify the behavior and help us on this issue for using sp.

Thanks in Advance...

With Regards

Deepak Subramoniam

6 Replies
avinashelite

have you installed all the necessary driver ? check the syntax in Qlikview script editor.

share the script so that we can identify the issue

vikramv
Creator III
Creator III

qlikvew cannot execute stored [procedures.

It can only execute any of the attached screenshot and any nested sql statement.etc...2016-06-29_0-05-32.png

Not applicable
Author

Sorry Vikram Vangala,

i was able to execute a sp with both with and without input

create table test

(

col1 int, col2 varchar(100)

)

insert into test values (1,'a')

create procedure Qliktest

as

begin

select col1,col2 from test

end

create procedure Qliktest_inp

@col1 int

as

begin

select col1,col2 from test where col1 =@col1

end

Qlik View code

================================

ODBC CONNECT32 TO server;

SQL exec Qliktest;

output

fetched 1 record

ODBC CONNECT32 TO server;

SQL exec Qliktest_inp;

input : 1

output

fetched 1 record

the problem for me is above as mentioned in discussion. is there any timeout parameter needs to be set..??

vikramvangala‌: thanks for spending your valuable time on my issue, please help me further to sort out this isse.

Thanks in Advance...

With Regards

Deepak Subramoniam

Kushal_Chawda

try

SQL exec schema_name.database_name.spc_test;

Anil_Babu_Samineni

Hello Deepak,

About calling procedures for within QlikView, if you have not achieved, you can try the way that I will mentioned below.

Step 1:

Set your script editor and it will open the databases in read and write mode.

Capture.PNG

Step 2:

Correctly write your connection string, it is ODBC or OLEDB, add, before or after the password the following content

"Mode is write"

Capture.PNG

Step 3:

Write correctly the call of Procedure that you want to call, in my example will look like this ...

"SQL call user_bi.prc.Anil('6.2016','017');"

Capture.PNG

I think this should work. Try and let me know..

- Anil

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
vikramv
Creator III
Creator III

.I thought you just wanted to read the data.If yoou need to update anything back to database then try Anil Babu's solution.It would work.