共用方式為


SqlCeParameter 建構函式 (String, SqlDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)

使用參數名稱、資料類型、長度、參數方向和其他屬性,初始化 SqlCeParameter 類別的新執行個體。SQL Server Compact 只支援輸入參數。

命名空間:  System.Data.SqlServerCe
組件:  System.Data.SqlServerCe (在 System.Data.SqlServerCe.dll 中)

語法

'宣告
Public Sub New ( _
    parameterName As String, _
    dbType As SqlDbType, _
    size As Integer, _
    direction As ParameterDirection, _
    isNullable As Boolean, _
    precision As Byte, _
    scale As Byte, _
    sourceColumn As String, _
    sourceVersion As DataRowVersion, _
    value As Object _
)
'用途
Dim parameterName As String
Dim dbType As SqlDbType
Dim size As Integer
Dim direction As ParameterDirection
Dim isNullable As Boolean
Dim precision As Byte
Dim scale As Byte
Dim sourceColumn As String
Dim sourceVersion As DataRowVersion
Dim value As Object

Dim instance As New SqlCeParameter(parameterName, _
    dbType, size, direction, isNullable, _
    precision, scale, sourceColumn, sourceVersion, _
    value)
public SqlCeParameter(
    string parameterName,
    SqlDbType dbType,
    int size,
    ParameterDirection direction,
    bool isNullable,
    byte precision,
    byte scale,
    string sourceColumn,
    DataRowVersion sourceVersion,
    Object value
)
public:
SqlCeParameter(
    String^ parameterName, 
    SqlDbType dbType, 
    int size, 
    ParameterDirection direction, 
    bool isNullable, 
    unsigned char precision, 
    unsigned char scale, 
    String^ sourceColumn, 
    DataRowVersion sourceVersion, 
    Object^ value
)
new : 
        parameterName:string * 
        dbType:SqlDbType * 
        size:int * 
        direction:ParameterDirection * 
        isNullable:bool * 
        precision:byte * 
        scale:byte * 
        sourceColumn:string * 
        sourceVersion:DataRowVersion * 
        value:Object -> SqlCeParameter
public function SqlCeParameter(
    parameterName : String, 
    dbType : SqlDbType, 
    size : int, 
    direction : ParameterDirection, 
    isNullable : boolean, 
    precision : byte, 
    scale : byte, 
    sourceColumn : String, 
    sourceVersion : DataRowVersion, 
    value : Object
)

參數

  • isNullable
    型別:System.Boolean
    如果欄位值可以是 null,則為 true,否則為 false。
  • precision
    型別:System.Byte
    Value 所解析的小數點左右側的位數總數。
  • sourceColumn
    型別:System.String
    來源資料行的名稱。

請參閱

參考

SqlCeParameter 類別

SqlCeParameter 多載

System.Data.SqlServerCe 命名空間