asp.net mysql Help Urgent

Discussion in 'C#' started by nikes, Jan 20, 2009.

  1. #1
    Any body help me to write a asp.net c# code to call a procedure in mysql with out parameter.

    MySqlCommand cmd = new MySqlCommand();
    cmd.CommandText = "call trial(@p)";
    cmd.Parameters.Add(new MySql.Data.MySqlClient.MySqlParameter("@p", MySqlDbType.VarChar, 65535, ParameterDirection.Output, true, 5, 0, "", DataRowVersion.Current, 0));
    cmd.Connection =con;
    cmd.ExecuteNonQuery();
    Response.Write( cmd.Parameters["@p"].Value.ToString());

    I tried this code but get an error message:-"Only input parameters are supported by MySql"

    Any body to help me . Thanks in advance.
     
    nikes, Jan 20, 2009 IP
  2. yugolancer

    yugolancer Well-Known Member

    Messages:
    320
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #2
    I am afraid you cannot use the mySql Output parameters along ASP.NET .. it seems reserved only for the MS SQL Server :( and if i remember well the .NET connector doesn't support MySQL's sprocs.
     
    yugolancer, Jan 21, 2009 IP