Sqlhelper类 如何调用
Public Function ExecuteNonQueryCommand(ByVal strSQL As String, ByVal params() As SqlParameter) As SqlCommandDim oconn As SqlConnection = GetConnection()
Dim command As New SqlCommand(strSQL, oconn)
= CommandType.Text
For i As Integer = 0 To params.Length - 1
command.Parameters.Add(params(i))
Next
oconn.Open()
Dim retval As Integer = command.ExecuteNonQuery()
oconn.Close()
oconn.Dispose()
Return command
End Function
我想调用这个类来执行以下SQL
Dim StrSql As String = "Delete from SysUser where NTIDName='Yu_yuk' and ValidityDate='07/25/2017'"
可以指点一下吗?SqlParameter 我不懂得怎么写