passing parameter in stored procedure

  • Either use Parameters.Refresh, or add two parameters. The first parameter is the RETURN_VALUE parameter for the procedure. Since it happens to be an integer data type, the parameter you are adding is getting associated with the error output parameter.

  • how can i do it then?

  • Try changing the parameter name

    From

    comm.Parameters.Add("newscat", SqlDbType.Int);

    To

    comm.Parameters.Add("@newscat", SqlDbType.Int);

    To verify, if you have a development server with admin rights, you can perform a trace to examine the calls as server receives them.

  • Hi i encountered a problem which is similar, my query as below:

    When i try to pass the date as parameter the error message saying that

    [failed with the following error:

    "Syntax error, permission violation, or other nonspecific error".

    Possible failure reasons: Problems with the query,

    "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. ]

    WITH Clist AS (SELECT QC_tag, rim_no, customer_name, pid_source, row_number() OVER (partition BY rim_no

    ORDER BY pid_source) AS nr

    FROM Risk.CUSTOMER

    WHERE snapshot_dt = ?)

    UPDATE Clist

    SET QC_tag = nr;

Viewing 4 posts - 1 through 5 (of 5 total)

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