![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/07/2009, 06:51
|
| | Fecha de Ingreso: junio-2007
Mensajes: 13
Antigüedad: 17 años, 7 meses Puntos: 0 | |
Respuesta: Problema con AddWithValue Este es el codigo para insertar los valores en el stored procedure
public void InsertarTipo(object pid_Marca, object pModelo, string pNombreStoredProcedure)
{
this.cxn = new SqlConnection(this.cadenaConexion);
this.command = new SqlCommand();
this.adapter = new SqlDataAdapter();
this.cxn.Open();
this.command.Connection = this.cxn;
this.command.CommandType = System.Data.CommandType.StoredProcedure;
this.command.CommandText = pNombreStoredProcedure;
this.command.Parameters.AddWithValue("@id_Marca", pid_Marca);
this.command.Parameters.AddWithValue("@Modelo", pModelo);
this.command.Parameters.AddWithValue("@Potencia", pPotencia);
this.command.ExecuteNonQuery;
this.cxn.Close();
} |