msdasql: Fixup GetCommandText wrt dialect.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2021-11-09 16:24:57 +11:00 committed by Alexandre Julliard
parent 5802a27dfe
commit 61d1152c7c
1 changed files with 4 additions and 1 deletions

View File

@ -834,8 +834,11 @@ static HRESULT WINAPI command_GetCommandText(ICommandText *iface, GUID *dialect,
if (!command->query) if (!command->query)
return DB_E_NOCOMMAND; return DB_E_NOCOMMAND;
if (IsEqualGUID(&DBGUID_DEFAULT, dialect)) if (!IsEqualGUID(&DBGUID_DEFAULT, dialect))
{
*dialect = DBGUID_DEFAULT;
hr = DB_S_DIALECTIGNORED; hr = DB_S_DIALECTIGNORED;
}
*commandstr = heap_alloc((lstrlenW(command->query)+1)*sizeof(WCHAR)); *commandstr = heap_alloc((lstrlenW(command->query)+1)*sizeof(WCHAR));
wcscpy(*commandstr, command->query); wcscpy(*commandstr, command->query);