ExecuteSQLTask::BypassPrepare Property
Gets or sets a Boolean that indicates whether the Execute SQL task skips preparation of the statement when sending the SQL statement to the relational database management system (RDBMS).
Assembly: Microsoft.SqlServer.SQLTask (in Microsoft.SqlServer.SQLTask.dll)
public: property bool BypassPrepare { virtual bool get() sealed; virtual void set(bool value) sealed; }
Property Value
Type: System::Booleantrue if the task bypasses preparation of the SQL command; false if the RDBMS prepares the statement before execution.
Implements
IDTSExecuteSQL::BypassPrepareThis property provides the ability to bypass the prepare command for OLE DB connections, because prepare does not support some Transact-SQL keywords, such as restore. This property, when set to true, lets the command run without preparing.
The following example creates an ExecuteSQLTask, then shows the default settings of the properties, including the BypassPrepare, using the TaskHost. It then sets the value of some properties to show how to set property values.
Sample Output:
BypassPrepare False
CodePage 1252
Connection
ExecutionValue
IsStoredProcedure False
ParameterBindings Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ParameterBindings
ResultSetBindings Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ResultBindings
ResultSetType 1
SqlStatementSource
SqlStatementSourceType 1
TimeOut 0
--------------------------
New value of Source and SourceType: myVar, 3
New value of ResultSetType: 4