Commit 3e0deb35 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msdasql: Select statements return -1 for affected rows in ICommandText Execute.

parent d4720191
...@@ -1244,13 +1244,6 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI ...@@ -1244,13 +1244,6 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
return E_FAIL; return E_FAIL;
} }
ret = SQLRowCount(hstmt, &results);
if (ret != SQL_SUCCESS)
ERR("SQLRowCount failed (%d)\n", ret);
if (affected)
*affected = results;
*rowset = NULL; *rowset = NULL;
if (!wcsnicmp( command->query, L"select ", 7 )) if (!wcsnicmp( command->query, L"select ", 7 ))
{ {
...@@ -1273,7 +1266,16 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI ...@@ -1273,7 +1266,16 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI
IRowset_Release(&msrowset->IRowset_iface); IRowset_Release(&msrowset->IRowset_iface);
} }
else else
{
ret = SQLRowCount(hstmt, &results);
if (ret != SQL_SUCCESS)
ERR("SQLRowCount failed (%d)\n", ret);
SQLFreeStmt(hstmt, SQL_CLOSE); SQLFreeStmt(hstmt, SQL_CLOSE);
}
if (affected)
*affected = results;
return hr; return 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