Problem with bind variables in direct mode
Posted: Mon 17 Sep 2007 14:07
Using the latest version of OraDirect 4.20 the following fails with:
ORA-01008: not all variables bound
This works fine when Direct=false.
Seems to be related to the fact that there is a repeated parameter in the query.
ORA-01008: not all variables bound
Code: Select all
OracleConnection oc = new OracleConnection();
oc.Direct = true;
oc.Server = "server";
oc.Sid="sid";
oc.UserId="username";
oc.Password="password";
oc.Open();
OracleCommand ocmd = oc.CreateCommand();
ocmd.ParameterCheck = true;
ocmd.CommandText = "select :p1,:p1,:p2 from dual";
ocmd.Prepare();
ocmd.Parameters["p1"].Value = "00000";
ocmd.Parameters["p2"].Value = "00001";
OracleDataReader or = ocmd.ExecuteReader();
Seems to be related to the fact that there is a repeated parameter in the query.