db2 stored procedures in asp

  • Hi,

    How to call DB2 stored procedures in ASP.

    Awaiting your code at the earliest.

    D Balakrishnan

    dbk@gmmcoindia.com

  • it should be same as calling any other stored procedure, only difference is interms of Driver.

    Sample String:

    Provider=IBMDADB2.DB2COPY1;Data Source=TM_REPORTING_00004;Persist Security Info=True;Password=123456;User ID=rfuser

  • Hi,

    This is my code

    Response.Expires = 0

    Dim m_strProcName

    Dim m_strConnectionString

    Dim rs

    m_strConnectionString= "Provider=IBMDA400.400COPY1;Data Source=ASC1F;Persist Security Info=True;User Id=dbk;Password=abc123x;Default Collection=libj09USR"

    m_strProcName = "salreg"

    Dim cmd

    Set cmd = Server.CreateObject("ADODB.Command")

    cmd.ActiveConnection = m_strConnectionString

    cmd.CommandType = 4 'Stored Procedure Command Type

    cmd.CommandText = m_strProcName

    Set rs=cmd.Execute (m_strprocname,-1,4) 'Line No 19

    response.write cmd("DTYPE")

    Out error is

    Error Type:

    IBMDA400 Command (0x80004005)

    SQL0204: S1 in type * not found. Cause . . . . . : S1 in type * was not found. If the member name is *ALL, the table is not partitioned. If this is an ALTER TABLE statement and the type is *N, a constraint or partition was not found. If this is not an ALTER TABLE statement and the type is *N, a function, procedure, trigger or sequence object was not found. If a function was not found, S1 is the service program that contains the function. The function will not be found unless the external name and usage name match exactly. Examine the job log for a message that gives more details on which function name is being searched for and the name that did not match. Recovery . . . : Change the name and try the request again. If the object is a node group, ensure that the DB2 Multisystem product is installed on your system and create a nodegroup with the CRTNODGRP CL command. If an external function was not found, be sure that the case of the EXTERNAL NAME on the CREATE FUNCTION statement exactly matches the case of the name exported by the service program.

    /storeproc.asp, line 19

    Please reply which help me lot.

    Regards

    D Balakrishnan

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply