Commit 5f8e3a0c authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msdasql: Support NULL dialect in GetCommandText.

parent 0d29647f
...@@ -910,7 +910,7 @@ static HRESULT WINAPI command_GetCommandText(ICommandText *iface, GUID *dialect, ...@@ -910,7 +910,7 @@ 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 (dialect && !IsEqualGUID(&DBGUID_DEFAULT, dialect))
{ {
*dialect = DBGUID_DEFAULT; *dialect = DBGUID_DEFAULT;
hr = DB_S_DIALECTIGNORED; hr = DB_S_DIALECTIGNORED;
......
...@@ -265,6 +265,12 @@ if (0) ...@@ -265,6 +265,12 @@ if (0)
hr = ICommandText_SetCommandText(comand_text, &DBGUID_DEFAULT, L"select * from testing"); hr = ICommandText_SetCommandText(comand_text, &DBGUID_DEFAULT, L"select * from testing");
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
hr = ICommandText_GetCommandText(comand_text, NULL, &str);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok (!lstrcmpW(L"select * from testing", str), "got %s\n", debugstr_w(str));
HeapFree(GetProcessHeap(), 0, str);
/* dialect empty value */ /* dialect empty value */
hr = ICommandText_GetCommandText(comand_text, &dialect, &str); hr = ICommandText_GetCommandText(comand_text, &dialect, &str);
ok(hr == DB_S_DIALECTIGNORED, "got 0x%08x\n", hr); ok(hr == DB_S_DIALECTIGNORED, "got 0x%08x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment