共用方式為


命令流屬性(ADO)

指出做為 Command 對象的輸入所使用的數據流。

設定和傳回值

設定或傳回做為 Command 對象輸入的數據流。 此數據流的格式為提供者特定;如需詳細資訊,請參閱提供者的檔。 這個屬性類似於 CommandText 屬性,用來指定 Command 輸入的字串。

備註

CommandStreamCommandText 互斥。 當使用者設定 CommandStream 屬性時, CommandText 屬性將會設定為空字串 (“” )。 如果用戶設定 CommandText 屬性, CommandStream 屬性將會設定為 Nothing

Provider 會定義 Command.Parameters.RefreshCommand.Prepare 方法的行為。 數據流中的參數值無法重新整理。

傳回 命令來源的其他 ADO 物件無法使用輸入資料流。 例如,如果 RecordsetSource 設定為具有數據流做為其輸入的 Command 物件,Recordset.Source 會繼續傳回 CommandText 屬性,其中包含空字串 (“”),而不是 CommandStream 屬性的數據流內容。

使用命令數據流時(如 CommandStream 所指定),CommandType 屬性的唯一有效 CommandTypeEnumadCmdText 和 adCmdUnknown 任何其他值都會導致錯誤。

適用於

Command 物件 (ADO)

另請參閱

CommandText 屬性 (ADO)
Dialect 屬性
CommandTypeEnum