本文整理汇总了VB.NET中System.Data.SqlClient.SqlParameter.SqlParameter构造函数的典型用法代码示例。如果您正苦于以下问题:VB.NET SqlParameter构造函数的具体用法?VB.NET SqlParameter怎么用?VB.NET SqlParameter使用的例子?那么, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在类System.Data.SqlClient.SqlParameter
的用法示例。
在下文中一共展示了SqlParameter构造函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: AddSqlParameter
Private Sub AddSqlParameter(ByVal command As SqlCommand)
Dim parameter As New SqlParameter()
With parameter
.ParameterName = "@Description"
.IsNullable = True
.SqlDbType = SqlDbType.VarChar
.Direction = ParameterDirection.Output
.Size = 88
End With
command.Parameters.Add(parameter)
End Sub
示例2: AddSqlParameter
Private Sub AddSqlParameter(ByVal command As SqlCommand, _
ByVal paramValue As String)
Dim parameter As New SqlParameter("@Description", _
SqlDbType.VarChar)
With parameter
.IsNullable = True
.Direction = ParameterDirection.Output
.Size = 88
.Value = paramValue
End With
command.Parameters.Add(parameter)
End Sub
示例3: AddSqlParameter
Private Sub AddSqlParameter(ByVal command As SqlCommand)
Dim parameter As New SqlParameter("@Description", _
SqlDbType.VarChar, 88, "Description")
With parameter
.IsNullable = True
.Direction = ParameterDirection.Output
End With
command.Parameters.Add(parameter)
End Sub
示例4: AddSqlParameter
Private Sub AddSqlParameter(ByVal command As SqlCommand, _
ByVal paramValue As String)
Dim parameter As New SqlParameter("@Description", _
SqlDbType.VarChar, 88)
With parameter
.IsNullable = True
.Direction = ParameterDirection.Output
.Value = paramValue
End With
command.Parameters.Add(parameter)
End Sub
示例5: AddSqlParameter
Private Sub AddSqlParameter(ByVal command As SqlCommand)
Dim parameter As New SqlParameter("@Description", _
SqlDbType.VarChar, 11, ParameterDirection.Input, _
True, 0, 0, "Description", DataRowVersion.Current, _
"garden hose")
parameter.IsNullable = True
command.Parameters.Add(parameter)
End Sub