G
Guest
Having a devil of a time passing a parameter to an oracle command in cnet .
If I substitute the :EXID for a string (Eg 'dogbreath') and remove the parm
stuff it all works. What I was expecting to happen was for the valiue in
exid_txt replace the :EXID. But instead I got the error "ORA-01008: not all
variables bound " at the da.fill line. Apparently I am missing can someone
fill me in?
query = "select ext, active, inactive from cam where ext = :EXID ";
OracleCommand cmd = new OracleCommand(query,con);
cmd.Parameters.Add("EXID", OracleType.VarChar);
cmd.Parameters["EXID"].Value = exid_txt.ToString();
DataSet ds = new DataSet();
OracleDataAdapter da = new OracleDataAdapter(query, con);
da.Fill(ds);
// squeeze a view and feed it the dataset ds for sortability
DataView dv = new DataView(ds.Tables[0]);
If I substitute the :EXID for a string (Eg 'dogbreath') and remove the parm
stuff it all works. What I was expecting to happen was for the valiue in
exid_txt replace the :EXID. But instead I got the error "ORA-01008: not all
variables bound " at the da.fill line. Apparently I am missing can someone
fill me in?
query = "select ext, active, inactive from cam where ext = :EXID ";
OracleCommand cmd = new OracleCommand(query,con);
cmd.Parameters.Add("EXID", OracleType.VarChar);
cmd.Parameters["EXID"].Value = exid_txt.ToString();
DataSet ds = new DataSet();
OracleDataAdapter da = new OracleDataAdapter(query, con);
da.Fill(ds);
// squeeze a view and feed it the dataset ds for sortability
DataView dv = new DataView(ds.Tables[0]);