i am new on asp.net with vb.code behind
i am trying get value from sql
my code
Dim apps As New MyApps
apps.OpenConnection()
Dim esql As New SqlCommand
esql.Connection = apps.oConn
esql.CommandText = "cekdatauploads"
esql.Parameters.Add("@value", SqlDbType.Int, 2)
esql.ExecuteNonQuery()
esql.Parameters("@value").Direction = ParameterDirection.Output
Dim nilai As Integer = esql.Parameters("@value").Value
apps.CloseConnection()
the error is
The parameterized query '(@value int)cekdatauploads' expects the parameter '@value', which was not supplied.
i already try execute store prosedure
declare @p int
exec [cekdatauploads] @p output
print @p
and return 0 not empty value.
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…