Topic
No replies
SystemAdmin
SystemAdmin
2826 Posts
ACCEPTED ANSWER

Pinned topic Calling iSeries Stored Procedure from T-SQL - SQL Server 2005

‏2007-03-25T20:37:58Z |
As anyone been able to call a "store procedure" on the iSeries 5.4 from "T-SQL"
using the "OLE" providers?

What I am finding that doesnt work is calling a simple stored procedure using any of the three IBM OLE providers - specifically IBMDASQL. I was hoping the recent upgrade, 5.4 iSeries along with Client Access would fix the problem. Ive come to a point where I have to say Stored Procedures are not supported in T-SQL using IBM's OLE providers!

However, the IBMDASQL does not break when I try various T-SQL statements such as:
SELECT...
EXEC 4-part only
EXEC...AT
OPENQUERY...
INSERT INTO OPENQUERY...
EXEC SP_EXECUTESQL...

In addition, the OLE work flawlessly in the .NET environment using .VB and C#.
Likewise, the ODBC in T-SQL works great calling a SP.

Regardless, calling a stored procedure using OLE fails ONLY on the SQL side. The SP on the iSeries is executed successfully leaving no error messages behind. On return to MS SQL 2005 the T-SQL will display the "MSG 0" message below:

"Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded."

Has anyone experienced such a problem in "T-SQL" using IBMDASQL provider for SP?

thanks