A
andrewbb
It keeps saying the stored procedure expects the parameter '@entity'
which was not suppplied, but I'm supplying it:
OdbcConnection cn = new OdbcConnection(CNSTR);
OdbcCommand cmd = new OdbcCommand("GetMyList", cn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@entity", OdbcType.VarChar, 4);
cmd.Parameters.Add("@type", OdbcType.VarChar, 4);
cmd.Parameters["@entity"].Value = "PRAC";
cmd.Parameters["@type"].Value = "TYPE";
cn.Open();
OdbcDataReader reader = cmd.ExecuteReader();
cn.Close();
If I substitute a SQL statement (no parameters) all is good. What I am
I doing wrong on the parameter creation/adding?
Thanks in advance.
which was not suppplied, but I'm supplying it:
OdbcConnection cn = new OdbcConnection(CNSTR);
OdbcCommand cmd = new OdbcCommand("GetMyList", cn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@entity", OdbcType.VarChar, 4);
cmd.Parameters.Add("@type", OdbcType.VarChar, 4);
cmd.Parameters["@entity"].Value = "PRAC";
cmd.Parameters["@type"].Value = "TYPE";
cn.Open();
OdbcDataReader reader = cmd.ExecuteReader();
cn.Close();
If I substitute a SQL statement (no parameters) all is good. What I am
I doing wrong on the parameter creation/adding?
Thanks in advance.