Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2007, 01:28 AM
Authorized User
 
Join Date: Mar 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Proc execution failed from CS code

Hi,
I have a piece of code which call a proc to update a table. The problem is that it is not updating table and it doesn't throw any error. I'm totally confused as to what kindof problem is this.

The proc def:
Code:
CREATE OR REPLACE PROCEDURE Updateincidentlov (
   errcode         OUT   INT,
   pid             TBL.id%TYPE,
   pdesc           TBL.desc%TYPE,
   pstatus         TBL.status%TYPE,
   porder          TBL.order%TYPE
)
The CS code:
Code:
public int Update(String Desc, int Order, int status, int Id)
{
        OracleConnection conn = this.CreateConnection();
        OracleTransaction transaction = conn.BeginTransaction();
        OracleCommand cmd = conn.CreateCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Transaction = transaction;

        cmd.CommandText = "UPDATETABLE";

        OracleParameter param1 = new OracleParameter("errcode", OracleType.Int32);
        param1.Direction = ParameterDirection.Output;

        OracleParameter param2 = new OracleParameter("pid", OracleType.Number);
        param2.Value = Id;
        param2.Direction = ParameterDirection.Input;

        OracleParameter param3 = new OracleParameter("pdesc", OracleType.VarChar);
        param3.Value = Desc;
        param3.Size = 4000;
        param3.Direction = ParameterDirection.Input;

        OracleParameter param4 = new OracleParameter("pstatus", OracleType.Number);
        param4.Value = status;
        param4.Direction = ParameterDirection.Input;

        OracleParameter param5 = new OracleParameter("porder", OracleType.Number);
        param5.Value = Order;
        param5.Direction = ParameterDirection.Input;

        cmd.Parameters.Add(param1);
        cmd.Parameters.Add(param2);
        cmd.Parameters.Add(param3);
        cmd.Parameters.Add(param4);
        cmd.Parameters.Add(param5);

        int errCode = cmd.ExecuteNonQuery();

        cmd.Dispose();
        conn.Close();
        conn.Dispose();

        return errCode;
}
------------------------------------------------------------------------------------------------------------
Adventure, Play, Alive, Fast, Race, Addict, React, Attack, Heat, Aggression, Blast, Ahead, Escape, Challenge, Anarchy, Game, Real, Damage, Insane, Acclerate,Passion, Fear, Dominate, Crazy, Awesome, Sweat, Habit, Avenge, Balls, Imagine, Viril, Chaos, Amuse, Heavy, Panic, @#!%, Fanatic
__________________
------------------------------------------------------------------------------------------------------------
<b><i>Adventure, Play, Alive, Fast, Race, Addict, React, Attack, Heat, Aggression, Blast, Ahead, Escape, Challenge, Anarchy, Game, Real, Damage, Insane, Acclerate,Passion, Fear, Dominate, Crazy, Awesome, Sweat, Habit, Avenge, Balls, Imagine, Viril, Chaos, Amuse, Heavy, Panic, @#!%, Fanatic </i></b>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Request Code Execution Permission Problem dparsons C# 0 May 14th, 2007 09:28 AM
Code Execution Stops for No Known Reason tcarnahan Access VBA 6 October 28th, 2003 04:00 PM
Run-time code execution module0000 Beginning VB 6 1 June 20th, 2003 04:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.