asp.net调用mysql存储过程,抛出:Only MySqlParameter objects may be stored
[code=C#][/code] using (MySqlConnection connection = new MySqlConnection(mysqlConnectionString))
{
using (MySqlCommand command = new MySqlCommand("p_getGjdata", connection))
{
command.Connection.Open();
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new MySqlParameter("?stime", MySqlDbType.VarChar).Value = "2011-11-11");
command.Parameters.Add(new MySqlParameter("?etime", MySqlDbType.VarChar).Value = "2011-11-12");
command.Parameters.Add(new MySqlParameter("?imsi", MySqlDbType.VarChar).Value = "460004134317878");
DataSet ds = new DataSet();
MySqlDataAdapter adapter = new MySqlDataAdapter(command);
adapter.Fill(ds);
------解决方案--------------------
stime是时间,但是参数类型是VarChar,不知道你的存储过程中是怎么写的