Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2007, 01:28 AM
Authorized User
 
Join Date: Mar 2006
Location: , , .
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>
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 02:23 AM.


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