problem passing parameters to oracle9i from C#.net
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: problem passing parameters to oracle9i from C#.net

  1. #1
    Join Date
    Jul 2006
    Posts
    4

    problem passing parameters to oracle9i from C#.net

    hey

    i have been facing problem in passing parameters to an oracle stored procedure from c#.net. i think the connection is alright. kindly specify how to send a string and mention any changes that have to be done in the basic code of the procedure. kindly post the code also.... thanks in advance....

    the procedure runs fine if it is executed from oracle directly....

    comm.Parameters.Add("isno",Convert.ToInt16(txtserial.Text));
    comm.Parameters[0].Direction = ParameterDirection.Input;

    comm.Parameters.Add("iname", txtname.Text );
    comm.Parameters[1].Direction = ParameterDirection.Input;

    this is how i tried to pass an integer value and an string to oracle....

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    and what error do you get

  3. #3
    Join Date
    Jul 2006
    Posts
    4

    oracle error...

    ora-01401 inserted value too large for column
    ora-06512at "scott.insert_try" line 26
    ora-06512 at line 1

    the problem is that when the procedure is run from SQL> with same values it runs perfect. but when we pass values through our front end app. it gives the above error

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    put some debug in the procedure to print out the lengths of the data being inserted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width