which was not supplied
-
Sunday, March 03, 2013 11:39 PM
Hola amigos, tengo un problema con este código, me da este error-> "which was not supplied...."
Me hace la actualización en la tabla, pero al final me da el error.
Uso Visual Basic de Visual Studio 2010, y el SQL Server que viene incorporado.
Mi código es este:
If DataGridView1.Rows.Count = 0 Then
Return
End If
Using conn As New SqlConnection("Data Source=WILFREDO-PC; Initial Catalog=miBASE;integrated security=True;")
conn.Open()
Dim CONSULTA As New String("UPDATE notas SET ingles1=@ingles1, ingles2=@ingles2, ingles3=@ingles3 WHERE id=@id")
Dim cmd As New SqlCommand(CONSULTA, conn)
For Each row1 As DataGridViewRow In DataGridView1.Rows
cmd.Parameters.Clear()
cmd.Parameters.AddWithValue("@ingles1", CInt(row1.Cells("Nota 1").Value))
cmd.Parameters.AddWithValue("@ingles2", CInt(row1.Cells("Nota 2").Value))
cmd.Parameters.AddWithValue("@ingles3", CInt(row1.Cells("Nota 3").Value))
cmd.Parameters.AddWithValue("@id", CStr(row1.Cells("ID").Value))
cmd.ExecuteNonQuery()
Next
MsgBox("los datos han sido insertados")
End UsingSaludos.
All Replies
-
Monday, March 04, 2013 7:20 PM
Return parameter is missing.-- Paul Wehland (MCM-SQL) Avanade GmbH
- Proposed As Answer by Papy NormandModerator Friday, March 08, 2013 8:18 AM
-
Friday, March 08, 2013 8:11 AMModerator
Hi Saludos,
Since this is an English forum, could you please post the thread using English?
I found that the error you faced to is: which was not supplied
Got these thread for this error on the internet which may help:
http://stackoverflow.com/questions/368642/procedure-expects-parameter-which-was-not-supplied
http://forums.asp.net/t/1136814.aspx/1
I would like to suggest you to re-post it in English for better support.
Iric Wen
TechNet Community Support- Edited by Iric WenModerator Friday, March 08, 2013 8:12 AM
- Proposed As Answer by Papy NormandModerator Friday, March 08, 2013 8:18 AM
- Marked As Answer by Iric WenModerator Tuesday, March 12, 2013 7:40 AM

