DataCommand.Prepare 메서드

실행 될 데이터 원본에 지정한 명령을 준비 합니다. 다양 한 매개 변수를 여러 번 다음 명령을 실행할 수 있습니다.

네임스페이스:  Microsoft.VisualStudio.Data
어셈블리:  Microsoft.VisualStudio.Data(Microsoft.VisualStudio.Data.dll)

구문

‘선언
Public Overridable Function Prepare ( _
    command As String, _
    commandType As Integer, _
    commandTimeout As Integer _
) As String
public virtual string Prepare(
    string command,
    int commandType,
    int commandTimeout
)
public:
virtual String^ Prepare(
    String^ command, 
    int commandType, 
    int commandTimeout
)
abstract Prepare : 
        command:string * 
        commandType:int * 
        commandTimeout:int -> string 
override Prepare : 
        command:string * 
        commandType:int * 
        commandTimeout:int -> string 
public function Prepare(
    command : String, 
    commandType : int, 
    commandTimeout : int
) : String

매개 변수

  • command
    형식: System.String
    데이터 원본에 관련 된 명령이 실행 됩니다.
  • commandType
    형식: System.Int32
    명령 유형을 지정 된 명령에 대 한 내용을 해석 하는 방법을 지정 하는 command 매개 변수.
  • commandTimeout
    형식: System.Int32
    실행을 취소 하 고 호출자에 반환 하기 전에 클라이언트가 차단 초 단위로 시간 길이입니다.0 값은 무한 시간 제한을 나타냅니다. 값-1의 기본을 공급자를 나타냅니다.

반환 값

형식: System.String
나중에 전달할 수 있는 준비 된 명령 식별자 반환의 Execute 또는 ExecuteWithoutResults 명령 형식을 사용 하 여 메서드 Prepared.

예외

예외 조건
ArgumentNullException

명령 또는 Asynccommandevents는 null입니다.

ArgumentException

Commandtype의 형식이 잘못 지정합니다.

ArgumentOutOfRangeException

Commandtimeout는-1 보다 작은 경우

NotSupportedException

이 메서드는 공급자를 지원 하지 않습니다.

설명

발생 하는 다른 예외 매개 변수가 파생 공급자가 지정한 이유로 실패를 나타내는.

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DataCommand 클래스

Microsoft.VisualStudio.Data 네임스페이스

DataCommand