Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: odbc read failed while executing sp

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

share the script so that we can identify the issue

vikkyv
Contributor II

Re: odbc read failed while executing sp

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

Re: odbc read failed while executing sp

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

Re: odbc read failed while executing sp

try

SQL exec schema_name.database_name.spc_test;

Re: odbc read failed while executing sp

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

Life is so rich, and we need to respect to the life !!!
vikkyv
Contributor II

Re: odbc read failed while executing sp

.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.

Community Browser