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 !!!
Help!!! Trouble With SelectCommand.Parameters
We cannot reproduce your problem with OraDirect .NET 3.20.7, Oracle server, client 9.2.0.4
Send us please small demo project to demonstrate the problem to OdaDirect .NET support address and include script to create server objects.
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;