当我执行C#script,如灯塔时,请ORA-01036:非法变更姓名/编号
using (OracleConnection conn = new OracleConnection(connectionString))
using (OracleCommand cmd = conn.CreateCommand())
using (OracleDataAdapter da = new OracleDataAdapter())
using (DataTable dt = new DataTable())
{
cmd.BindByName = true;
cmd.CommandText = "SELECT :A A FROM DUAL";
cmd.Parameters.Add("A", "THE DATA");
da.SelectCommand = cmd;
da.Fill(dt);
}
but when I change cmd.CommandText = "SELECT :A A FROM DUAL"; to cmd.CommandText = "SELECT A A FROM DUAL where :A = THE DATA "; it s run
我的问题是:bind params between select and from,t bebro by C#?
SOLUTION : I ve changed the library from Oracle.DataAccess to Oracle.ManagedDataAccess