Advertisement

07.17.2008 at 07:10AM PDT, ID: 23573232
[x]
Attachment Details

How do I call a stored procedure (ASP.net) using the IBM provided OLE DB driver.  I'm getting an error message.

Asked by fairrington in Programming for ASP.NET, DB2 Database

Tags: asp.net calling DB2 stored procedure, There was an error. IBM OLE DB Provider for DB2 [DB2/NT64] SQL0444N Routine "*FOR_ZONE" (specific name "SQL080717085156720") is implemented with code in library or path "\FTC.LOOKUP_STATE_FOR_ZONE", f

I'm trying to call a simple stored procedure that takes an input parm (string), does a look up, and returns an output parm (string).  I'm using ASP.NET (VS 2008) using the 2.0 framework.  I'm calling an IBM DB2 9.1 LUW database running on Windows 64-bit through OLEDB .  Here is the message I keep getting when trying to call this program.

There was an error. IBM OLE DB Provider for DB2 [DB2/NT64] SQL0444N Routine "*FOR_ZONE" (specific name "SQL080717085156720") is implemented with code in library or path "\FTC.LOOKUP_STATE_FOR_ZONE", function "*TE_FOR_ZONE" which cannot be accessed. Reason code: "4". SQLSTATE=42724  

Please help.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim cnn As New OleDbConnection("Provider=IBMDADB2.DB2COPY1;Data Source=TM_REPORTING_00004;Persist Security Info=True;Password=123456;User ID=rfuser")
        Dim cmd As New OleDbCommand("FTC.LOOKUP_STATE_FOR_ZONE", cnn)
        cmd.CommandType = CommandType.StoredProcedure
        
        cmd.Parameters.Add("IN_ZIP", OleDbType.WChar)
        With cmd.Parameters("IN_ZIP")
            .Direction = ParameterDirection.Input
            .Size = 10
            .Value = TextBox1.Text
        End With
        cmd.Parameters.Add("OUT_STATE", OleDbType.WChar)
        With cmd.Parameters("OUT_STATE")
            .Direction = ParameterDirection.Output
            .Size = 4
            .Value = " "
        End With
        
 
        Try
            cnn.Open()
            cmd.ExecuteNonQuery()
            Label1.Text = cmd.Parameters("OUT_STATE").Value
 
        Catch ex As Exception '
 
            Label1.Text = "There was an error. " & ex.Source & " " & ex.Message
 
        Finally
            
            cnn.Close()
            cnn.Dispose()
 
        End Try
    End Sub
[+][-]07.17.2008 at 07:32AM PDT, ID: 22025838

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, DB2 Database
Tags: asp.net calling DB2 stored procedure, There was an error. IBM OLE DB Provider for DB2 [DB2/NT64] SQL0444N Routine "*FOR_ZONE" (specific name "SQL080717085156720") is implemented with code in library or path "\FTC.LOOKUP_STATE_FOR_ZONE", f
Sign Up Now!
Solution Provided By: momi_sabag
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.17.2008 at 08:08AM PDT, ID: 22026259

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 10:46AM PDT, ID: 22027986

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628