Version

CreateCommand Method

Creates an implementation-specific database command associated with the Connection of this WebSchedule data provider.
Syntax
'Declaration
 
Protected Function CreateCommand( _
   ByVal text As String _
) As IDbCommand
protected IDbCommand CreateCommand( 
   string text
)

Parameters

text
Either the name of a stored procedure, or dynamic SQL to be executed (see the Remarks below for further explanation).

Return Value

An IDbCommand-implementation specific to the currently connected database, or null (Nothing in Visual Basic .NET) if the Connection property has not yet been initialized.
Remarks

The underlying implementation of the IDbCommand returned by this method depends on the implementation of the IDbConnection created by an inheritor's override of CreateConnection. The Connection property of the returned IDbCommand will be initialized to this WebSchedule data provider's Connection.

The CommandType on the returned IDbCommand is initialized based on the setting of UseStoredProcedure. When this WebSchedule data provider is configured to use stored procedures, the text parameter must be the stored procedure's name, or a run-time database error will result when the command is executed. If stored procedures are not used (or not supported by the WebSchedule data provider subclass) then the text parameter should be the dynamic SQL to be performed when the command is executed. If text is not specified (it is null or Nothing in Visual Basic .NET) then the CommandText property on the command object returned will remain uninitialized (the WebSchedule data provider may defer initialization of it until a later point in time).

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also