problem "same name are not supported" c # [closed]

1

Good people I have a problem to be programming in C# to fill the form of poles I get an error

Code

using System;
using MySql.Data.MySqlClient;
using System.Windows.Forms;
using System.Data;

namespace CapaDatos{

    public class IngresoPoste {
       private dbConxion conexion2 = new dbConxion();
          MySqlCommand comando2 = new MySqlCommand();
          public void agregarPoste(String codPos1, String tipRed1, 
                                   String mater1, String estado1,
                                   String direc1, String propi1, 
                                   double puntoX1, double puntoY1, 
                                   String fot11, String fot21, 
                                   String fot31, String obs1)
        {
            try
            {
                comando2.Connection = conexion2.AbriConexion();
                comando2.CommandText = ("proc_insertar_poste");
                comando2.CommandType = CommandType.StoredProcedure;
                comando2.Parameters.AddWithValue("@codPos", codPos1);
                comando2.Parameters.AddWithValue("@tipRed", tipRed1);
                comando2.Parameters.AddWithValue("@mater", mater1);
                comando2.Parameters.AddWithValue("@estado", estado1);
                comando2.Parameters.AddWithValue("@direc", direc1);
                comando2.Parameters.AddWithValue("@propi", propi1);
                comando2.Parameters.AddWithValue("@puntoX", puntoX1);
                comando2.Parameters.AddWithValue("@puntoY", puntoY1);
                comando2.Parameters.AddWithValue("@fot1", fot11);
                comando2.Parameters.AddWithValue("@fot2", fot21);
                comando2.Parameters.AddWithValue("@fot3", fot31);
                comando2.Parameters.AddWithValue("@obs", obs1);
                comando2.ExecuteNonQuery();
            }
            catch (Exception ex) {
                MessageBox.Show("ocurrio un error--->"+ex.Message);
            }
        }
    }
}

Well what I'm doing is a program that consists of three layers one has the database connection of MySql and as you can see I'm calling the database in conexion2 to call a procedure and what store, but I get the error

  

same name are not supported

any help?

Procedure

PROCEDURE 'proc_insertar_poste'(

                    IN codPos varchar(45), 
                    IN tipRed varchar(45),
                    IN mater varchar(45),
                    IN estado varchar(45), 
                    IN direc text, 
                    IN propi varchar(45), 
                    IN puntoX double,
                    IN puntoY double, 
                    IN fot1 varchar(500), 
                    IN fot2 varchar(500), 
                    IN fot3 varchar(500), 
                    IN obs text)
BEGIN
  INSERT INTO poste (   cod_Poste, 
                        Tipo_red, 
                        Material, 
                        Estado, 
                        Direccion, 
                        Propietario, 
                        PUNTO_X, 
                        PUNTO_Y, 
                        Fecha_Creacion_P, 
                        foto1, 
                        foto2, 
                        foto3, 
                        observaciones)

        VALUES (            codPos, 
                            tipRed, 
                            mater, 
                            estado, 
                            direc, 
                            propi, 
                            puntoX, 
                            puntoY, 
                            now(), 
                            fot1, 
                            fot2, 
                            fot3, 
                            obs);
    END
    
asked by Siber Almanza 24.05.2018 в 17:41
source

0 answers