ADO.NET对象的构造(7)_OleDbParameter(中)

类别:.NET开发 点击:0 评论:0 推荐:

示例

 Public Sub CreateOleDbParameter()

    Dim myParameter As New OleDbParameter()

    myParameter.ParameterName = "Description"

    myParameter.OleDbType = OleDbType.VarChar

    myParameter.Direction = ParameterDirection.Output

    myParameter.Size = 88

 

    Dim myParameter As OleDbParameter = New OleDbParameter("Description", "Beverages")

 

    Dim myValue As String = "12 foot scarf - multiple colors, one previous owner"

    Dim myParameter As New OleDbParameter("Description", OleDbType.VarChar)

    myParameter.Direction = ParameterDirection.Output

    myParameter.Size = myValue.Length

    myParameter.Value = myValue

 

    Dim myParameter As New OleDbParameter("Description", OleDbType.VarChar, 88)

    myParameter.SourceColumn = "Description"

    myParameter.SourceVersion = DataRowVersion.Current

 

    Dim myParameter As New OleDbParameter("Description", OleDbType.VarChar, 88)

    myParameter.Direction = ParameterDirection.Output

 

    Dim myParameter As New OleDbParameter("Description", OleDbType.VarChar, 88, "Description")

    myParameter.Direction = ParameterDirection.Output

 

    Dim myParameter As New OleDbParameter("Description", OleDbType.VarChar, 11, ParameterDirection.Output, True, 0, 0, "Description", DataRowVersion.Current, "garden hose")

End Sub

 

创建参数后需要将其添加至相应命令或存储过程的参数集中

本文地址:http://com.8s8s.com/it/it45020.htm