Help!!! Trouble With SelectCommand.Parameters

Help!!! Trouble With SelectCommand.Parameters

Postby DVE » Sun 12 Feb 2006 09:38

Then first time call
QFunc.SelectCommand.Parameters["PStr"].Value := "xxxxxxxxxxxx";
QFunc.SelectCommand.ExecuteNonQuery();

Execute Oracle proc with value of parameter is "xxxxxxxxxxxx";

then call this proc with other value of parameter
QFunc.SelectCommand.Parameters["PStr"].Value := "F**K";
QFunc.SelectCommand.ExecuteNonQuery();

Execute Oracle proc with value of parameter is "F**Kxxxxxxxx";

WHY ??????????????????????????????????????????
Please explain this is a BUG or Fitches !

I can create parameters in RUNTIME, but i don't want it !!!
DVE
 
Posts: 5
Joined: Sun 12 Feb 2006 09:29

Postby Paul » Mon 13 Feb 2006 10:09

We cannot reproduce your problem with OraDirect .NET 3.20.7, Oracle server, client 9.2.0.4

Code: Select all
      oracleConnection1.Open();
      oracleCommand1.CommandText = "INOUT_PARAMS_PROC";
      oracleCommand1.CommandType = CommandType.StoredProcedure;
      oracleCommand1.Parameters.Clear();
      oracleCommand1.CreateParameters();

      ((OracleParameter)oracleCommand1.Parameters["varchar_p1"]).Value = "xxxxxxxxxxxx";
      oracleCommand1.ExecuteNonQuery();

      string s = (string)((OracleParameter)oracleCommand1.Parameters["varchar_p2"]).Value;
     
      ((OracleParameter)oracleCommand1.Parameters["varchar_p1"]).Value = "F**K";
      oracleCommand1.ExecuteNonQuery();

      s = (string)((OracleParameter)oracleCommand1.Parameters["varchar_p2"]).Value;
      GC.KeepAlive(s);


Code: Select all
CREATE OR REPLACE PROCEDURE          INOUT_PARAMS_PROC
(
  varchar_p1 IN OUT VARCHAR2,
  varchar_p2 IN OUT VARCHAR2
) IS
BEGIN
  varchar_p2 := varchar_p1;
END INOUT_PARAMS_PROC;


Send us please small demo project to demonstrate the problem to OdaDirect .NET support address and include script to create server objects.
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dotConnect for Oracle