Returns the currently set interface pointer of a stream object containing a command.
HRESULT GetCommandStream ( IID *piid, GUID *pguidDialect, IUnknown **ppCommandStream);
Parameters
A pointer to memory where the provider returns an IID that specifies the type of object referenced by *ppCommandStream.
If piid is a null pointer on input, the provider does not return the IID.
If this method returns an error, *piid is set to IID_NULL.
A pointer to memory containing a GUID that specifies the syntax and general rules for parsing the command stream—that is, the dialect that will be used by the provider to interpret the statement. This is usually the dialect specified in ICommandStream::SetCommandStream.
However, if DBGUID_DEFAULT is specified in SetCommandStream, the provider returns the particular dialect that it will use to interpret the statement. If the provider must choose between multiple dialects at execution time for a command that has been set with DBGUID_DEFAULT or if the provider is returning some provider-specific syntax that might be different from the command set in ICommandStream::SetCommandStream, it returns DBGUID_DEFAULT. Providers can define GUIDs for their own dialects.
If ICommandStream::GetCommandStream returns an error, *pguidDialect is set to DB_NULLGUID.
If pguidDialect is a null pointer on input, the provider does not return the dialect.
A pointer to memory where the command stream interface pointer is returned. If ICommandStream::GetCommandStream returns an error, *ppCommandStream is set to a null pointer.
Return Code
ICommand::Execute | ICommandStream::SetCommandStream | ICommandText::GetCommandText