insertar datos en una tabla
Publicado por octavio (4 intervenciones) el 01/11/2007 21:09:04
ME URGE POR FAVOR RESPONDANME LO ANTES POSIBLE.No he podido insertar datos en una tabla este es el codigo que estoy utilizando:
SqlCommand1.Parameters("@rfc").Value = TextBox1.Text
SqlCommand1.Parameters("@nombre").Value = TextBox2.Text
SqlCommand1.Parameters("@direccion").Value = TextBox3.Text
SqlCommand1.Parameters("@telefono").Value = TextBox4.Text
SqlCommand1.Parameters("@ocupacion").Value = TextBox5.Text
SqlCommand1.Parameters("@nick").Value = TextBox6.Text
SqlCommand1.Parameters("@contraseña").Value = TextBox7.Text
SqlCommand1.Parameters("@saldo").Value = TextBox8.Text
SqlConnection2.Open()
SqlCommand1.ExecuteNonQuery()
SqlConnection2.Close()
ya hice las conexiones a la tabla.. y me sale este error: An SqlParameter with ParameterName '@rfc' is not contained by this SqlParameterCollection.
NO SE QUE HACER
SqlCommand1.Parameters("@rfc").Value = TextBox1.Text
SqlCommand1.Parameters("@nombre").Value = TextBox2.Text
SqlCommand1.Parameters("@direccion").Value = TextBox3.Text
SqlCommand1.Parameters("@telefono").Value = TextBox4.Text
SqlCommand1.Parameters("@ocupacion").Value = TextBox5.Text
SqlCommand1.Parameters("@nick").Value = TextBox6.Text
SqlCommand1.Parameters("@contraseña").Value = TextBox7.Text
SqlCommand1.Parameters("@saldo").Value = TextBox8.Text
SqlConnection2.Open()
SqlCommand1.ExecuteNonQuery()
SqlConnection2.Close()
ya hice las conexiones a la tabla.. y me sale este error: An SqlParameter with ParameterName '@rfc' is not contained by this SqlParameterCollection.
NO SE QUE HACER
Valora esta pregunta


0