| title | CCommand::Create | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | article | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | e4bede7a-68bd-491a-97f4-89b03d45cd24 | |||||||||||||
| caps.latest.revision | 9 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
Calls CCommand::CreateCommand to create a command for the specified session, then calls ICommandText::SetCommandText to specify the command text.
HRESULT CCommandBase::Create(
const CSession& session,
LPCWSTR wszCommand,
REFGUID guidCommand = DBGUID_DEFAULT
) throw ( );
HRESULT CCommandBase::Create(
const CSession& session,
LPCSTR szCommand,
REFGUID guidCommand = DBGUID_DEFAULT
) throw ( );
session
[in] A session on which to create the command.
wszCommand
[in] A pointer to the Unicode text of the command string.
szCommand
[in] A pointer to the ANSI text of the command string.
guidCommand
[in] A GUID that specifies the syntax and general rules for the provider to use in parsing the command text. For a description of dialects, see ICommandText::GetCommandText in the OLE DB Programmer's Reference.
A standard HRESULT.
The first form of Create takes a Unicode command string. The second form of Create takes an ANSI command string (provided for backward compatibility with existing ANSI applications).
Header: atldbcli.h