Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

Loading a Stored Proc from SQL

Hi All,

I am trying to load a stored proc from SQL called OITMVIEW, I have the following in my script;

ITEMS:
LOAD *;
SQL Exec OITMVIEW;

But when executed I receive the following error;

" Error: File .\extdata.cpp, Line 1826
SQL Exec OITMVIEW "



Any help would be greatly appreciated. Note that I dont have any variables to sent through to SQL.
Kind Regards,
Wynand.


Tags (2)
1 Solution

Accepted Solutions
Not applicable

Loading a Stored Proc from SQL

you may want to try the steps on this http://community.qlik.com/forums/p/19638/74936.aspx

I hope this helps.

9 Replies
Not applicable

Loading a Stored Proc from SQL

Hi,

Normally the stored procedure is working as for SQL syntax:

that means that SQL EXECUTE MyProcedure; Should work

Maybe this is not as simple, but are you sure that when you are connecting with your SQL command line, with the same user, then, running EXEC xxxxx is working fine ?

Maybe parameters are missing ?

Maybe you should specify the db owner to execute the stored procedure from ?

Rgds,

Sébastien

Not applicable

Loading a Stored Proc from SQL

Hi Wynand,

Once you stablisch the ODBC connection to the SQL Server..

You can do it like this:

ODBC

CONNECT TO [PACLDB2K801 -LINCS] .........



XYZ:

LOAD *

;

SQL

// you may need to include the database name on the next statement, depending if the login id has a default db different than were the stored procedure is located..

EXEC [dbo].[RPT_OR_Pressing_Material]



@LocationID = 0,

@DepartmentID = 0,

@WorkgroupID = 0,

@WorkcenterID = 0,

@StartDate = N'05/01/2010',

05/09/2020',

-1',

-1',

@ReportOptionID = N'Detail',

@ResponsibleIDs = N'-1'

;

mike_garcia
Contributor III

Loading a Stored Proc from SQL

Hi,

It is not something related to the SQL statement. It is related to security rights, as explained here: http://community.qlik.com/forums/p/26440/101333.aspx#101333

That also happens when connecting to other DB's

Mike.

Not applicable

Loading a Stored Proc from SQL

Hi Mike,

The link you provided refers to someone trying to execute a SAP query. I am trying to run a SQL Stored Procedure. I have a proper connection to the database as I am drawing other data into Qlikview, I am just unable to get the Stored Procedure to execute.

Does anyone else perhaps have any other input?

Thanks,

Wynand.

Not applicable

Loading a Stored Proc from SQL


MiguelMena wrote:
Hi Wynand,
Once you stablisch the ODBC connection to the SQL Server..
You can do it like this:


ODBC
CONNECT TO [PACLDB2K801 -LINCS] .........



XYZ:
LOAD *
;

SQL

// you may need to include the database name on the next statement, depending if the login id has a default db different than were the stored procedure is located..
EXEC [dbo].[RPT_OR_Pressing_Material]

@LocationID = 0,
@DepartmentID = 0,
@WorkgroupID = 0,
@WorkcenterID = 0,
@StartDate = N'05/01/2010',
05/09/2020',
-1',
-1',
@ReportOptionID = N'Detail',
@ResponsibleIDs = N'-1'
;


<div></div>


Hi,

I am currently using an OLE DB connection to SQL. When I change to ODBC, I receive this error.

"ODBC read failed
SQL Execute OITMVIEW"

Thanks,

Wynand.



Not applicable

Loading a Stored Proc from SQL

you may want to try the steps on this http://community.qlik.com/forums/p/19638/74936.aspx

I hope this helps.

Not applicable

Loading a Stored Proc from SQL

     Error: Error: File .\extdata.cpp, Line 1826

     General Script Error

     Execution Failed

We are getting the above error while the applicaton reload via QEMC. Have you found any solution for this and why this is happening.

Thanks in advance.

Arunesh

helgeantonsen
New Contributor

Loading a Stored Proc from SQL

Hi,

I have also this problem latest described 13. September 2011, but can't see any solutions in this threat.

helgeantonsen
New Contributor

Loading a Stored Proc from SQL

My problem is solved. I used ODBC connection in stead of OLE DB connection.  Probably an old SQL server or driver. If you also have this problem you can try.

Community Browser