Tuesday, March 27, 2012

DB2 Stored Procedures using ODBC

I am trying to call DB2 z/OS Stored Procedures from the report designer using
a DataDirect ODBC driver. I get a result set with a simple SP which has no
input parameters. If I call a SP with one input parameter defined as
integer, my result set is returned if I code the value in the call statement.
But, if I give it a parameter marker and supply the value after being
prompted, I get an error stating "VALUE OF INPUT HOST VARIABLE NUM 001 NOT
USED; WRONG DATA TYPE".
My guess is that the parameter marker may get passed instead of the value,
or the integer is not being converted correctly. If I change the datatype of
the input parm in my SP to CHAR(1), everything works fine. Note: I am not
using the input parms in my SP. They are being ignored for testing reasons.
If I used the IBM OLE DB driver, my above scenario works fine. This leads
me to believe I have an ODBC setting issue (or some other programmer error).
And for the record, I am using the DataDirect ODBC driver instead of the IBM
OLE DB because of licensing concerns.
Has anyone had similar issues while calling DB2 Stored Procedures via an
ODBC driver?Hello,
Based on the symptom, it is more like that the issue exist in the odbc
driver. If you are use SQL 2005, You could try latest Microsoft OLEDB
provider for DB2
http://www.microsoft.com/downloads/details.aspx?FamilyID=D09C1D60-A13C-4479-
9B91-9E8B9D835CDC&displaylang=en
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks. We are using SQL 2000 and accessing DB2 on z/OS. I am also in
contact with the driver's support team, but I was wondering if anyone has
tried something similar. Reporting Services works great with this driver for
mapping to tables, but using Stored Procedures has proved difficult.
""privatenews"" wrote:
> Hello,
> Based on the symptom, it is more like that the issue exist in the odbc
> driver. If you are use SQL 2005, You could try latest Microsoft OLEDB
> provider for DB2
> http://www.microsoft.com/downloads/details.aspx?FamilyID=D09C1D60-A13C-4479-
> 9B91-9E8B9D835CDC&displaylang=en
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>|||Hello,
I think the driver support team shall be the best resource on this issue.
You may also want to try some other drivers if possible
http://www.codeproject.com/dotnet/DotnetDb2.asp
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment