SqlCeCommand 생성자
SqlCeCommand 클래스의 새 인스턴스를 초기화합니다.
네임스페이스: System.Data.SqlServerCe
어셈블리: System.Data.SqlServerCe(System.Data.SqlServerCe.dll)
구문
‘선언
<SecurityCriticalAttribute> _
<SecurityTreatAsSafeAttribute> _
Public Sub New
‘사용 방법
Dim instance As New SqlCeCommand()
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public SqlCeCommand()
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public:
SqlCeCommand()
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
new : unit -> SqlCeCommand
public function SqlCeCommand()
주의
기본 생성자는 모든 필드를 기본값으로 초기화합니다. 다음 표에서는 SqlCeCommand 인스턴스의 초기 속성 값을 보여 줍니다.
속성 |
초기 값 |
---|---|
빈 문자열("") |
|
Text |
|
null |
예
다음 예제에서는 SqlCeCommand를 만들고 그 속성의 일부를 설정합니다.
Dim cmd As SqlCeCommand = conn.CreateCommand()
cmd.CommandText = "SELECT * FROM Categories ORDER BY CategoryID"
cmd.CommandType = CommandType.Text
cmd.UpdatedRowSource = UpdateRowSource.Both
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Categories ORDER BY CategoryID";
cmd.CommandType = CommandType.Text;
cmd.UpdatedRowSource = UpdateRowSource.Both;