MySQL Forums
Forum List  »  Newbie

using connector/net
Posted by: Emanuele Scozzafava
Date: September 06, 2004 08:55AM

hi!
I'm using mysql 5.0.1 and I want to use stored procedures.
I populate correctly mysqlcommand.parameters collection,
but when I try to execute the command (using ExecuteReader method)
I have an error message.
It says that there isn't parameters to the mysqlcommand object!

this is the code:

MySqlCommand cm = new MySqlCommand();
cm.CommandType = CommandType.StoredProcedure;
cm.Connection = cn;
cm.CommandText = "test";
cm.Parameters.Add("@par0", MySql.Data.MySqlClient.MySqlDbType.VarChar, 15).Value = "test";
MySqlDataReader dr = cm.ExecuteReader(CommandBehavior.SingleResult);

any suggestions?

Options: ReplyQuote


Subject
Written By
Posted
using connector/net
September 06, 2004 08:55AM
September 06, 2004 10:16AM
September 07, 2004 01:09AM
September 07, 2004 05:54AM
September 07, 2004 07:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.