Bug #7206 | Error whit more than one resultset | ||
---|---|---|---|
Submitted: | 12 Dec 2004 19:23 | Modified: | 16 Dec 2004 18:43 |
Reporter: | V. Geovanny Fiallo Carranco | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S1 (Critical) |
Version: | 1.0.2 gamma | OS: | Windows (Windows XP Profesional SP2) |
Assigned to: | Reggie Burnett | CPU Architecture: | Any |
[12 Dec 2004 19:23]
V. Geovanny Fiallo Carranco
[14 Dec 2004 12:44]
Reggie Burnett
Please try this code and see if this fails for you. If not, can you send me some code that reproduces the problem. Also, can you upgrade to the latest 5.0 snapshot? // create our procedure execSQL( "CREATE PROCEDURE spTest() " + "BEGIN SELECT * FROM mysql.db; SELECT * FROM mysql.db; END" ); MySqlCommand cmd = new MySqlCommand("spTest", conn); cmd.CommandType = CommandType.StoredProcedure; MySqlDataReader reader = cmd.ExecuteReader(); Assert.AreEqual( true, reader.Read() ); Assert.AreEqual( true, reader.NextResult() ); Assert.AreEqual( true, reader.Read() ); Assert.AreEqual( false, reader.NextResult() ); Assert.AreEqual( false, reader.Read() ); reader.Close(); execSQL("DROP PROCEDURE spTest");
[14 Dec 2004 20:17]
V. Geovanny Fiallo Carranco
So sorry, i don't have framework 1.0 any more, i have framewor 1.1 now, and error persist. I try your example but don't work. I develop a component data with MySql.Data.dll and this use MySqlAdapter. Try this to replicate: *-Table parametro: pa_id_parametro, int(11), Primary, not null pa_nombre, varchar(20), not null pa_valor, varchar(50), not null pa_descripcion, varchar(100) *-Table usuario us_id_usuario, int(11), Primary, Not Null us_nombre, varchar(50), Not Null us_apellido, varchar(50), Not Null us_login, varchar(20), Not Null us_clave, varchar(50), Not Null *- Stored Procedure sp_parametros_iniciales(In i_NombreParametro varchar(20), In i_Login varchar(20) begin Select Cast(pa_valor As Date) From Parametro Where pa_nombre = i_NombreParametro; Select us_id_usuario From Usuario Where us_login = i_Login; end *- Code C# for test MySqlConnection myCon; MySqlCommand myCom; MySqlDataAdapter myDa; DataSet ds; string strCon; string strQuery; strCon = "Database=salomon;Data Source=localhost;User Id=desarrollo;Password=desarrollo"; myCon = new MySqlConnection(strCon); myCon.Open(); strQuery = "sp_parametros_iniciales"; myCom = new MySqlCommand(strQuery, myCon); //myCom.Connection = myCon; //myCom.CommandText = strQuery; myCom.CommandType = CommandType.StoredProcedure; MySqlParameter[] myPar = { new MySqlParameter("@i_NombreParametro",MySqlDbType.VarChar,20) ,new MySqlParameter("@i_Login",MySqlDbType.VarChar,20)}; myPar[0].Value = "FECHAP"; myPar[1].Value = "FialloG"; myCom.Parameters.Add(myPar[0]); myCom.Parameters.Add(myPar[1]); ds = new DataSet(); myDa = new MySqlDataAdapter(myCom); myDa.Fill(ds); Console.WriteLine("Presentando Informacion..."); Console.WriteLine("Dato 1: "+ds.Tables[0].Rows[0][0].ToString()); Console.WriteLine("Dato 2: "+ds.Tables[1].Rows[0][0].ToString()); Console.ReadLine(); Geovanny Fiallo
[16 Dec 2004 18:43]
Reggie Burnett
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: This was the same problem as with bug # 7345 which I have now fixed.